Skip to content

Commit 31fcc65

Browse files
author
xhlulu
committed
Add shared cache group to webpack config & manifest.in
1 parent e7d762e commit 31fcc65

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

{{cookiecutter.project_shortname}}/MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ include {{cookiecutter.project_shortname}}/{{cookiecutter.project_shortname}}.mi
22
include {{cookiecutter.project_shortname}}/{{cookiecutter.project_shortname}}.min.js.map
33
include {{cookiecutter.project_shortname}}/async-*.js
44
include {{cookiecutter.project_shortname}}/async-*.js.map
5+
include {{cookiecutter.project_shortname}}/*-shared.js
6+
include {{cookiecutter.project_shortname}}/*-shared.js.map
57
include {{cookiecutter.project_shortname}}/metadata.json
68
include {{cookiecutter.project_shortname}}/package-info.json
79
include README.md

{{cookiecutter.project_shortname}}/webpack.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ module.exports = (env, argv) => {
102102
name(module, chunks, cacheGroupKey) {
103103
return `${cacheGroupKey}-${chunks[0].name}`;
104104
}
105+
},
106+
shared: {
107+
chunks: 'all',
108+
minSize: 0,
109+
minChunks: 2,
110+
name: '{{cookiecutter.project_shortname}}-shared'
105111
}
106112
}
107113
}

0 commit comments

Comments
 (0)