1

I am using webpack, and it is bundling files from bower_components. I want to use the non-minified version of a library, not the minified version.

How can I force webpack to do this?

[Edit]

The library in question is mithril.js. I know this can be an issue for other libraries, so this question isn't about mithril, but about webpack.

I just figured out that webpack is using the non-minified version of jquery, which is in node_modules, so maybe it's an issue with how the library is set up in bower.

[/Edit]

Mnebuerquo
  • 5,759
  • 5
  • 45
  • 52
  • Check environment parameter `NODE_ENV`, it should be `development` – Bob Sponge Feb 26 '16 at 10:07
  • Thanks, @BobSponge, but that didn't entirely work. The library in question is mithril.js, which has a non-minified copy in bower_components. Webpack just can't seem to see it. – Mnebuerquo Feb 26 '16 at 11:09

1 Answers1

0

I used npm to install the library and removed it from bower_components. Webpack was able to find the non-minified version in node_modules, so now I can debug.

I don't know why webpack could not use the non-minified version from bower_components, but since I have something working and a deadline approaching, I'm not going to investigate further now.

Mnebuerquo
  • 5,759
  • 5
  • 45
  • 52
  • You can use fast solution by adding `alias` for lib: `YOUCONFIG.resolve.alias.mithril = path.join(nodeModulesPath, "mithril /dist/mithril.js");` – Bob Sponge Feb 26 '16 at 11:22