Skip to content

Commit

Permalink
Enable webpack bundle optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
fkleon committed May 9, 2024
1 parent c32466e commit 8376fe2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,21 @@ module.exports = (env, argv) => {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'bundle.js',
filename: '[name].[contenthash].js',
path: path.resolve(__dirname, 'build/dist'),
},
optimization: {
moduleIds: 'deterministic',
runtimeChunk: 'single',
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
},
},
},
};
};

0 comments on commit 8376fe2

Please sign in to comment.