JavaScriptServices icon indicating copy to clipboard operation
JavaScriptServices copied to clipboard

Adding custom npm package to webpack.config.vendor.js doesn't work

Open Vx2gas opened this issue 9 years ago • 2 comments

Hello,

I'm trying to integrate a 3rd party angular components, and they have a npm package they ship. Following their instructions, I have the following in the package.json: "wijmo": "../3rdParty/wijmo/wijmo-system-min"

This will then create a wijmo folder inside of the node_modules. Then I further go into webpack.config.vendor.js, and add the following to the vendor section: var sharedConfig = { entry: { vendor: [ 'wijmo' ] }, }

When I do that and run: webpack --config webpack.config.vendor.js

I get the following error: ERROR in dll vendor Module not found: Error: Cannot resolve module 'wijmo' in

What am I doing wrong? Any help would be greatly appreciated.

Thanks!

Vx2gas avatar Jan 26 '17 22:01 Vx2gas

I was able to resolve this by changing my webpack.config.vendor.js to the following: entry: { vendor: [ 'wijmo/wijmo.js', 'wijmo/wijmo.grid.js', 'wijmo/wijmo.angular2.core.js', 'wijmo/wijmo.angular2.grid.js', 'wijmo/styles/wijmo.min.css' ] },

Vx2gas avatar Jan 27 '17 00:01 Vx2gas

Thank you for documenting this. I just happened to run across this while searching for a solution. Would be nice is Wijmo had this documented on their website.

brunnels avatar Apr 14 '17 15:04 brunnels