npm init -y
npm i -D webpack webpack-cli
npm i -D html-webpack-plugin
// npm i -D clean-webpack-plugin
- mount js to html automatically
clean-webpack-plugin (don't need in webpack 5)
npm i -D babel-loader @babel/core @babel/preset-env @babel/preset-env @babel/plugin-proposal-class-properties
touch .babelrc
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
npm i -D sass-loader postcss-loader css-loader style-loader postcss-preset-env node-sass
npm i -D webpack-dev-server