javascript - How to exclude default node packages from webpack -
i want exclude child_process
, os
package being bundled in webpack bundle. have multiple files requiring these default node modules.
what have tried worked somehow:
externals: [ 'child_process', 'os' ],
but others, not seem work:
./~/neataptic/src/multithreading/workers/node/testworker.js module not found: error: can't resolve 'child_process' in '[...]/node_modules/neataptic/src/multithreading/workers/node' @ ./~/neataptic/src/multithreading/workers/node/testworker.js 7:9-33 @ ./~/neataptic/src/multithreading/workers/workers.js @ ./~/neataptic/src/multithreading/multi.js @ ./~/neataptic/src/neataptic.js
how should default node packages included? keep in mind bundle browser (umd
).
Comments
Post a Comment