add caching and hashing
This commit is contained in:
parent
f1acb9fe99
commit
1bc2a1a8ce
2
makefile
2
makefile
@ -4,5 +4,5 @@ build:
|
||||
serve:
|
||||
npx webpack serve --no-open
|
||||
|
||||
dev-server:
|
||||
serve-dist:
|
||||
python -m http.server --directory dist/ 8700
|
||||
|
@ -19,15 +19,24 @@ module.exports = {
|
||||
],
|
||||
output: {
|
||||
clean: true,
|
||||
filename: '[name].bundle.js',
|
||||
filename: '[name].[contenthash].bundle.js',
|
||||
path: relpath('dist'),
|
||||
},
|
||||
devServer: {
|
||||
static: relpath('dist'),
|
||||
},
|
||||
optimization: {
|
||||
// fixes problems when bundling more than one entry
|
||||
moduleIds: 'deterministic',
|
||||
runtimeChunk: 'single',
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: 'vendors',
|
||||
chunks: 'all',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
performance: {
|
||||
// hides the performance warnings for now
|
||||
|
Loading…
Reference in New Issue
Block a user