mkdir newproject && cd newproject
npm init -y
to 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.js
in project's directorynpm i -D html-webpack-plugin html-loader
allows us to copmpile html file. Remember to configure webpack.config.js file.npm run build
ornpm run start:dev
(according to package.json scripts object. For example{"start:dev": "webpack-dev-server"}
)npm i -D webpack-dev-server
https://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-loader
https://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 has been archived by the owner on Sep 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
ericaig/webpack-tut
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Learning webpack
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published