Wednesday, 15 March 2017

Exclude directory from webpack

I have a subproject within my app that contains its own node_modules/ and such. It's isolated from the main project in terms of scripts, but should to be within it. This may not make sense, but it's true.

The thing is, the node_modules (at least) are interfering with webpack. I'm getting errors like Duplicate Identifier, Cannot redeclare block-scoped variable, ...

By simply deleting the subproject directory the bundling starts to work.


Best solution scenario would be to add an exclude entry on the webpack config, but things don't work that way.

How can I fix this? I can't find a solution!



via Sergio Carneiro

No comments:

Post a Comment