Introduce a new pattern that you can make your code being split into a certain chunk group, the modules like shared react context can be shared among among the bundles with same format.
Convention
<base name>.<layer>-runtime.<ext>
Having a file convention like foo.shared-runtime.js, it will match the convention and shared will become the layer it's going to be bundled into. Bundler will create a new chunk group contains those files.
If you have a shared module that needs to share across the entries, this convention can be used to achieve.
Introduce a new pattern that you can make your code being split into a certain chunk group, the modules like shared react context can be shared among among the bundles with same format.
Convention
Having a file convention like
foo.shared-runtime.js
, it will match the convention andshared
will become the layer it's going to be bundled into. Bundler will create a new chunk group contains those files.If you have a shared module that needs to share across the entries, this convention can be used to achieve.
Resolves #429