You may not need a bundler for your NPM library
cmdcolin.github.io
You may not need a bundler for your NPM library
1–10 of 40 posts
Re: You may not need a bundler for your NPM library
#2Re: You may not need a bundler for your NPM library
#3Having zip's (.jar/.war) which had the source and compiled artefacts available and not cluttering the OS with unzip items.
I've run into huge issues dealing with deployments to AWS Lambda nodejs, where the previous developer could not work out how to make a 'slip' deployment and just zipped the whole folder node_modules and all and shipped that, this included all testing tools including an entire browser exe etc. 150mb file expanded to 350mb with 300k in files. And 95%+ of it was boiler-pate to test the api endpoint logic...
I've still not come across the simplest way to have dependences on modules with testing and still be able to deploy a slim zip. There is more and more push to do container layers for the node_modules, but still many of these has 100'000 objects which are not needed causing lambda stutter(startup sleepyness).
Re: You may not need a bundler for your NPM library
#4That's a reason for bundling.
Re: You may not need a bundler for your NPM library
#5We're converging on better norms for JS dialects/module systems, but we're not all the way there yet, so I don't see much purpose dropping support for multiple formats when some people might still need some of them
If you do want to go clean-slate and drop all the ceremony at once, I recommend Deno :)
Re: You may not need a bundler for your NPM library
#6Re: You may not need a bundler for your NPM library
#7Completely agree, ship it using tsc and in pure esm. Its time to move on from CJS
Re: You may not need a bundler for your NPM library
#8- dependency versions being fixed is a feature. I've had package installs fail because a dependency published a semver-compatible update that broke something. In a web context this would break the app until the dependency pulled the update or the dependent pushed an update disallowing that version.
Re: You may not need a bundler for your NPM library
#9At least for me I think maintaining a tight feedback loop between "make a change" => "verify it works" is important to not be distracted by another task. esbuild taking 100 or so ms while tsc taking 30+ seconds makes a world of difference for that.
Re: You may not need a bundler for your NPM library
#10> If you are bundling dependencies, you are not allowing people to get updates to your sub-dependencies with semver! That's a reason for bundling.