complete-node-bootcamp icon indicating copy to clipboard operation
complete-node-bootcamp copied to clipboard

Parcel Bundler Migration

Open ImamTaufiqHermawan opened this issue 3 years ago • 1 comments

please need new script watch:js/build:js, because parcel 2 migration

ImamTaufiqHermawan avatar Dec 08 '21 09:12 ImamTaufiqHermawan

You first have to specify this field:

  "targets": {
    "main": false
  },

then you can use this script:

    "watch:js": "parcel watch ./public/js/index.js --dist-dir ./public/js/bundle --no-source-maps",

unfortunately the --out-file option was removed and as far as I understood you can't change the output file name without using a plugin called 'Namer', but I didn't try that far; Important note: you have to specify a folder in this path ./public/js/bundle as I did otherwise, you gonna get an error due to the collision in name between the output bundled index.js file and the one we already have in the project. Hope this helps!😁

Mahmoud-AbouDeghedy avatar Apr 27 '23 03:04 Mahmoud-AbouDeghedy