Basic minimal configuration for webpack to compile scss, sass, es6 (with browsers support), assets(images/files), reactjs(jsx), vue, and typescript.
yarn add webpack webpack-cli webpack-dev-server -D
Docs: https://webpack.js.org/guides/getting-started/#basic-setup
yarn add css-loader mini-css-extract-plugin -D
yarn add sass sass-loader -D
Docs: https://webpack.js.org/loaders/css-loader/
https://webpack.js.org/plugins/mini-css-extract-plugin/#root
https://webpack.js.org/loaders/sass-loader/
yarn add css-minimizer-webpack-plugin -D
https://webpack.js.org/plugins/css-minimizer-webpack-plugin/
yarn add babel-loader @babel/core @babel/preset-env -D
Docs: https://webpack.js.org/loaders/babel-loader/
Docs: https://babeljs.io/docs/en/babel-preset-env
yarn add postcss postcss-preset-env postcss-loader -D
Docs: https://github.com/postcss/postcss
https://webpack.js.org/loaders/postcss-loader/#root
yarn add clean-webpack-plugin -D
https://github.com/johnagan/clean-webpack-plugin
yarn add html-webpack-plugin -D
Docs: https://webpack.js.org/plugins/html-webpack-plugin/#root
Don't install anything extra to handle files;
() for webpack 4 || loaders included in webpack 5yarn add file-loader image-loader -D
Docs: https://webpack.js.org/guides/asset-modules/
yarn add react react-dom
yarn add @babel/preset-react -D
Docs: https://babel.dev/docs/en/babel-preset-react
yarn add vue vue-router
yarn add vue-loader vue-template-compiler @vue/compiler-sfc vue-style-loader -D
Docs: https://vue-loader.vuejs.org/guide/
Extra: vue-style-loader and css-loader conflict
vuejs/vue-style-loader#46 (comment)
yarn add @babel/preset-typescript -D