shlomiassaf/webpack-dll-bundles-plugin

DLL libs not excluded from main bundle

Closed this issue · 4 comments

Thanks for the amazing work on this!

At my company we have a build system which is based off AngularClass/angular2-webpack-starter. I've pulled in the latest changes which incorporate this plugin. When I run it I am seeing that the Angular is included in both the main bundle and the DLL bundle. I expect the libraries in the DLL bundle to be excluded from the main bundle.

The main difference in our build system implementation is that it is packaged as an internal NPM lib and included in our projects as a devDependency. I'm wondering if something with this approach could be causing this issue. Any thoughts?

Found the issue. https://github.com/shlomiassaf/webpack-dll-bundles-plugin/blob/master/src/DllBundlesPlugin.ts#L24. If I change this to the project root, everything works as expected. Can this be configurable?

Try installing 1.0.0-beta.4

And in the option provide a context.

Should do the trick.

Let me know if it works, I didn't test it... blind try

5f95f36#diff-09377062f408640cd6246947929130e4R80

if (!this.options.context) instead?

I can confirm this is fixed. I didn't realize I had the same issue until today. Actually I am wondering why we don't read the context from the webpack.config ?