DEV Community

Discussion on: Do you know webpack?

Collapse
 
misterhtmlcss profile image
Roger K.

Hi! Yes I'd love to connect and absolutely I'll look at Parcel now. I was looking at it before, but it didn't seem so easy as advertised. I'll take a second look; my last look was a year ago. Message me when you feel you can confirm a time. I'll keep checking my messages.

Collapse
 
wolfhoundjesse profile image
Jesse M. Holmes

I felt the same way, but then this happened:

{
  "name": "react-typescript-by-example",
  "version": "1.0.0",
  "description": "A step-by-step example of building react apps with TypeScript and parcel",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "parcel build src/index.html",
    "start": "parcel src/index.html"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "parcel-bundler": "^1.10.3",
  }
}

I mean, I don't even have my name on the thing. Ha! I thought it would get endlessly complicated once I threw react in, but:

"dependencies": {
    "parcel-bundler": "^1.10.3",
    "react": "^16.6.3",
    "react-dom": "^16.6.3"
  },
  "devDependencies": {
    "@types/react": "^16.7.7",
    "@types/react-dom": "^16.0.10",
    "typescript": "^3.1.6"
  }

I added the react pieces from npm, but parcel took care of the typescript for me. There is some babel configuration hidden away, too. My first bump happened when I tried to write some tests with .tsx extensions. Keep in mind, this is just something I'm playing around with and not an actual process, but I got over that bump by adding this ridiculous typescript configuration:

{
  "compilerOptions": {
    "jsx": "react"
  }
}

It made me laugh.

Thread Thread
 
misterhtmlcss profile image
Roger K.

Haha. That's awesome. I'm watching a YouTube video on Webpack 4 right now. It's morning still in Calgary so I love me some programming vids while I'm sipping my morning coffee. I'm watching a Parcel one next ;)