Skip to content

Commit

Permalink
#75 update webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-serb committed Apr 23, 2023
1 parent 5852501 commit ca82ef0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ module.exports = (env, argv) => {
filename: '[name].[contenthash].js',
path: path.resolve(__dirname, 'docs'),
},
optimization: {
splitChunks: {
chunks: 'all',
},
minimize: true,
innerGraph: true,
usedExports: true,
},
resolve: {
extensions: ['.js', '.mjs', '.jsx', '.json'],
alias: {
Expand All @@ -36,13 +44,16 @@ module.exports = (env, argv) => {
],
}),
new HTMLWebpackPlugin({
inject: true,
template: './index.html',
filename: 'index.html',
chunks: ['index'],
}),
],
module: {
rules: [
{
test: /\.m?jsx?$/,
test: /\.m?jsx?$/i,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
Expand Down

0 comments on commit ca82ef0

Please sign in to comment.