Skip to content

Commit

Permalink
Add shared cache group to webpack config & manifest.in
Browse files Browse the repository at this point in the history
  • Loading branch information
xhlulu committed Apr 28, 2021
1 parent e7d762e commit 31fcc65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions {{cookiecutter.project_shortname}}/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ include {{cookiecutter.project_shortname}}/{{cookiecutter.project_shortname}}.mi
include {{cookiecutter.project_shortname}}/{{cookiecutter.project_shortname}}.min.js.map
include {{cookiecutter.project_shortname}}/async-*.js
include {{cookiecutter.project_shortname}}/async-*.js.map
include {{cookiecutter.project_shortname}}/*-shared.js
include {{cookiecutter.project_shortname}}/*-shared.js.map
include {{cookiecutter.project_shortname}}/metadata.json
include {{cookiecutter.project_shortname}}/package-info.json
include README.md
Expand Down
6 changes: 6 additions & 0 deletions {{cookiecutter.project_shortname}}/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ module.exports = (env, argv) => {
name(module, chunks, cacheGroupKey) {
return `${cacheGroupKey}-${chunks[0].name}`;
}
},
shared: {
chunks: 'all',
minSize: 0,
minChunks: 2,
name: '{{cookiecutter.project_shortname}}-shared'
}
}
}
Expand Down

0 comments on commit 31fcc65

Please sign in to comment.