Getting Started with Parcel.js
Steps for v1⌗
- Install NPM module
npm install --save-dev parcel-bundler
- Add NPM scripts
{
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html"
}
}
- Start the development server
npm start
Steps for v2⌗
- Install NPM module
npm install --save-dev parcel@next
- Add NPM scripts
{
"scripts": {
"start": "parcel serve index.html",
"build": "parcel build index.html"
}
}
- Start the development server
npm start
Bonus⌗
- Set the public url
{
"scripts": {
"build": "parcel build index.html --public-url ./"
}
}
Read other posts
Discuss Post