parceljs is a web application bundler, differentiated by its developer experience. it offers blazing-fast performance utilizing multicore processing and requires zero configuration. with parcel, you don’t have to set up any configuration or any loader for either css,js,image e.t.c. parceljs bundler webpack alternative.
install parceljs bundler as a global package:
npm install -g parcel-bundler
create a package.json file your project directory using:
npm init -y
to add an entry point for our application let’s add a new file index.html in the project directory and insert the following html code into that file:
index.html
<html>
<body>
<div id="msg"></div>
<script src="./index.js"></script>
</body>
</html>
or
index.js
document.getElementById('msg').innerText = "hello world!";
now let’s start up the development web server by using the following command:
parcel index.html
install parceljs bundler as a global package:
npm install -g parcel-bundler
create a package.json file your project directory using:
npm init -y
to add an entry point for our application let’s add a new file index.html in the project directory and insert the following html code into that file:
index.html
<html>
<body>
<div id="msg"></div>
<script src="./index.js"></script>
</body>
</html>
or
index.js
document.getElementById('msg').innerText = "hello world!";
now let’s start up the development web server by using the following command:
parcel index.html
0 Comments