During this short tutorial, we will be installing webpack from scratch.
You will need a computer with Node and NPM installed.
- Check your version of NPM:
$ npm -vNote: You need at least the 3.5 version of NPM to avoid any performance issues.
- Create a new npm package
$ npm init -y- Install webpack
$ npm install --save-dev webpack- We want to be able to bunble CSS file into our JS bundles, for that we need both the Style and CSS loaders.
$ npm install --save-dev style-loader css-loader- We also want to use SCSS (Sass) syntaxt.
$ npm install sass-loader node-sass webpack --save-devClick on the best option according to your needs and continue the steps provided on that README file.
- Vanilla JS application: A simple Javascript web application.
- WordPress: Use Webpack with your WordPress installation
- React JS: Install everything you need to start a basic React.JS application.