complete-node-bootcamp
complete-node-bootcamp copied to clipboard
Parcel Bundler Migration
please need new script watch:js/build:js, because parcel 2 migration
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!😁