mkdir newproject && cd newprojectnpm init -yto create package package.json filenpm i -D webpack webpack-cli: to install webpack and webpack command line interface. Remember to configure webpack.config.js file.touch webpack.config.jsin project's directorynpm i -D html-webpack-plugin html-loaderallows us to copmpile html file. Remember to configure webpack.config.js file.npm run buildornpm run start:dev(according to package.json scripts object. For example{"start:dev": "webpack-dev-server"})npm i -D webpack-dev-serverhttps://github.com/webpack/webpack-dev-servernpm i -D @babel/core babel-loader @babel/preset-env: helps to compile javascript code to allow code compatibility on all browsers.npm i -D file-loaderhttps://www.npmjs.com/package/file-loadernpm i -D node-sass style-loader css-loader sass-loader mini-css-extract-plugin: helps to compile sass files
This repository was archived by the owner on Sep 1, 2021. It is now read-only.
ericaig/webpack-tut
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|