3 ms·
Huh, is bundling commonly found in library npm packages? Which packages do this? Asking so I can avoid this. I already have a bundle intended for distribution
by creatonez 4y ago
Huh, is bundling commonly found in library npm packages? Which packages do this? Asking so I can avoid this.
I already have a bundle intended for distribution to web browsers, I don't need these sorts of poor practices introducing unnecessary bundling code. Nested bundling sounds like insanity to me. So I very much agree with the author that this practice never made sense in the first place, and I'm baffled that it exists. It's very much an npm anti-pattern.
- johnnypangs 4y agoI think a lot of them use bundlers but they use them for transpiling, going from ts to js and creating esm and common js files not for bundling in dependencies. I’ve also seen bundlers be used to include css in js as to not require users to manually import it. It’s not so bad, working with just tsc can be a little more cumbersome as you have to running it multiple times to get esm and common js and it’s slower than some alternatives. I see it more akin to using a makefile than an anti pattern.