Webpack 5 Boilerplate for JS/React/TS apps.
Webpack 5 Boilerplate for JS/React/TS apps.
:link: Demo on CodeSandbox
You can easily add settings for Vue or Angular components.
Vue
yarn add -D vue-loader vue-template-compiler
# or
npm i -D yarn vue-loader vue-template-compiler
const VueLoaderPlugin = require('vue-loader/lib/plugin')
module.exports = {
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
},
plugins: [
new VueLoaderPlugin()
]
}
Angular
yarn add -D angular2-template-loader
# or
npm i -D angular2-template-loader
{
test: /.tsx?$/i,
exclude: /node_modules/,
use: [babelLoader, 'ts-loader', 'angular2-template-loader?keepUrl=true']
},
# clone repo
git clone https://github.com/harryheman/Webpack5-Max.git
# install deps
yarn
# or
npm i
yarn start
# or
npm start
yarn build
# or
npm run build
yarn pwa
# or
npm run pwa
yarn analyze
# or
npm run analyze
This project is open source and available under the MIT License