Closed stevemao closed 4 years ago
Hi steve. Any update?
We shouldn't bundle node_modules, but the reason in README is wrong.
Hi, if still relevant - when building a library for npm (or for Node environment), there is actually no need to bundle its dependencies. Since it will run in Node, it can just require
its dependencies (without bundling).
The purpose of this library is to allow running Webpack on the source code - while keeping the dependencies unbundled.
I'm not sure if this is correct. Webpack will only bundle it once if within the same version range. I think another reason to use this module is some modules might use binary. Some might use unconventional way to load modules. Some might use
fs
with relative paths.