Quickly create a simple webpack app
npx create-webpack-slim my-app
cd my-app
yarn install
yarn start
-
dev config
webpack.config.dev.js
-
- babel
-
- css module
-
- html template
-
- devServer
-
prod config
webpack.config.prod.js
-
- css extract
-
- hash8 filename
-
- copy public
-
- split chunks
You can modify the
output.publicPath
configuration inwebpack.config.prod.js
to set the url prefix for static resources.
babel-loader
css-loader
file-loader
style-loader
url-loader
MiniCssExtractPlugin.loader
clean-webpack-plugin
copy-webpack-plugin
html-webpack-plugin
mini-css-extract-plugin
Happy coding!