How to update the vendor package? #1565

Closed
opened 2025-08-09 17:20:38 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @ManuelDeLeon on 6/14/2016

How can I update the vendor package? In my particular case I'm trying to add dragula and ng2-dragula to the vendor package (an Angular 2 project). Here's what I'm doing:

  1. Added dragula and ng2-dragula to package.json "dependencies" section.
  2. Added dragula and ng2-dragula to webpack.config.vendor.js entry.vendor array.
  3. Added the dragula typings.
  4. Added import * as dragula from 'dragula'; and console.log(dragula); to a file.
  5. Ran webpack --configure webpack.config.vendor.js

This is where I get confused because it doesn't create/update the vendor bundle, only the main.js one.

ts-loader: Using typescript@1.8.10 and C:\MyFiles\Angular\MCAngular\tsconfig.json
Hash: 81d70ace7cd2ee804915
Version: webpack 1.13.1
Time: 3116ms
  Asset    Size  Chunks             Chunk Names
main.js  356 kB       0  [emitted]  main
   [0] multi main 28 bytes {0} [built]
    + 34 hidden modules

And if I try to run it I get:

[Node] ReferenceError: document is not defined
[Node]     at Object.<anonymous> (C:\MyFiles\Angular\MCAngular\node_modules\custom-event\index.js:24:23)
[Node]     at Module._compile (module.js:541:32)
[Node]     at Object.Module._extensions..js (module.js:550:10)
[Node]     at Module.load (module.js:458:32)
[Node]     at tryModuleLoad (module.js:417:12)
[Node]     at Function.Module._load (module.js:409:3)
[Node]     at Module.require (module.js:468:17)
[Node]     at require (internal/module.js:20:19)
[Node]     at Object.<anonymous> (C:\MyFiles\Angular\MCAngular\node_modules\crossvent\src\crossvent.js:3:19)
[Node]     at Module._compile (module.js:541:32)

It would be nice to know how to add something to the vendor module (like dragula), it would be even better to understand what's going on here.

Thanks for the help.

*Originally created by @ManuelDeLeon on 6/14/2016* How can I update the vendor package? In my particular case I'm trying to add `dragula` and `ng2-dragula` to the vendor package (an Angular 2 project). Here's what I'm doing: 1. Added `dragula` and `ng2-dragula` to `package.json` `"dependencies"` section. 2. Added `dragula` and `ng2-dragula` to `webpack.config.vendor.js` `entry.vendor` array. 3. Added the dragula typings. 4. Added `import * as dragula from 'dragula';` and `console.log(dragula);` to a file. 5. Ran `webpack --configure webpack.config.vendor.js` This is where I get confused because it doesn't create/update the vendor bundle, only the `main.js` one. ``` ts-loader: Using typescript@1.8.10 and C:\MyFiles\Angular\MCAngular\tsconfig.json Hash: 81d70ace7cd2ee804915 Version: webpack 1.13.1 Time: 3116ms Asset Size Chunks Chunk Names main.js 356 kB 0 [emitted] main [0] multi main 28 bytes {0} [built] + 34 hidden modules ``` And if I try to run it I get: ``` [Node] ReferenceError: document is not defined [Node] at Object.<anonymous> (C:\MyFiles\Angular\MCAngular\node_modules\custom-event\index.js:24:23) [Node] at Module._compile (module.js:541:32) [Node] at Object.Module._extensions..js (module.js:550:10) [Node] at Module.load (module.js:458:32) [Node] at tryModuleLoad (module.js:417:12) [Node] at Function.Module._load (module.js:409:3) [Node] at Module.require (module.js:468:17) [Node] at require (internal/module.js:20:19) [Node] at Object.<anonymous> (C:\MyFiles\Angular\MCAngular\node_modules\crossvent\src\crossvent.js:3:19) [Node] at Module._compile (module.js:541:32) ``` It would be nice to know how to add something to the vendor module (like dragula), it would be even better to understand what's going on here. Thanks for the help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1565
No description provided.