How to limit the DllReferencePlugin web package to specific pieces?

Is there a way to restrict access to webpack.DllReferencePlugin to only certain pieces? For example, if I have the following entry, plugins:

entry: {
  application: ['./app/application.js', './assets/less/application.less'],
  marketing: ['./app/marketing.js', './assets/less/marketing.less'],
  shared: ['./app/shared.js', './assets/less/shared.less']
}

plugins: [
  new webpack.DllReferencePlugin({
    manifest: path.resolve(__dirname, 'dist/js/shared-vendor-manifest.json')
  }),
  new webpack.DllReferencePlugin({
    manifest: path.resolve(__dirname, 'dist/js/application-vendor-manifest.json'),
    chunks: ['application']
  })
]

I would like to allow only the "application" fragment to see "application-vendor-manifest.json"

+4
source share

Source: https://habr.com/ru/post/1674744/


All Articles