3 ms·
> Of course, this entails the risk of occasional breakage. But for 99% of modules, this has no impact at runtime. Right so most projects end up with 100's (ran
by filterfiber 3y ago
> Of course, this entails the risk of occasional breakage. But for 99% of modules, this has no impact at runtime.
Right so most projects end up with 100's (random one I have is 700+) modules. Which would mean multiple breakages.
The worst part isn't the breakage - it's not knowing where or when it breaks, and because it could be missed when it's being bundled it can happen in production.
The bundling step should effectively be doing the file pruning for you (or even parts of files) and you can be a lot more confident that won't miss things.
node_modules are generally big (580MB in my case), but I don't know why you'd trade 580MB of storage for reliability. For us the 580MB will get bundled under 1MB for our web application, essentially all dev machines will be 512GB+ at this point anyway.