Webpack DllReferencePlugin not working

I have a problem with DllReferencePlugin in one of my projects (I am using Webpack 1.13.2). In particular, I have 3 pairs of manifest and package files generated by DllPlugin , and in the section of my plugins for the main package I have 3 sections of DllReferencePlugin:

entry: {    
  body: [
    './src/main.js',
  ],
},
...
plugins: [
...
    new webpack.DllReferencePlugin({
      context: process.cwd(),
      manifest: path.join(dllPath, 'commons-manifest.json'),
    }),
    new webpack.DllReferencePlugin({
      context: process.cwd(),
      manifest: path.join(dllPath, 'vendor-manifest.json'),
    }),
    new webpack.DllReferencePlugin({
      context: process.cwd(),
      manifest: path.join(dllPath, 'react-manifest.json'),
    }),    
]
...

When I try to start it, I get the following error:

/node_modules/webpack/lib/DelegatedModuleFactoryPlugin.js:43 if (&& request in this.options.content) {^

TypeError: cannot use the 'in' operator to search './src/main.js' in undefined

, , - . , .

+4
1

, Webpack (1.13.2) manifest: require(path.join(dllPath, 'commons-manifest.json')) manifest: path.join(dllPath, 'commons-manifest.json')

+1

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


All Articles