Re:You may not need a bundler for your NPM library
by korijn on Thursday September 01, 2022 @01:31AM
(#32672368)
Isn't that exactly what bundling does?
Re:You may not need a bundler for your NPM library
by mouzogu on Thursday September 01, 2022 @02:45AM
(#32672852)
i think bundling generates your build from the source, but i mean generating a source from a build. so what i mean is more like reverse bundling.
so that you don't have to pull node_modules every time and install. i;m not totally sure but i dont think you can turn a minified bundled js files back into their original node_module source files...
Re:You may not need a bundler for your NPM library
by andrewaylett on Sunday September 11, 2022 @11:06AM
(#32800209)
That very much depends on the build -- if you've a source map, then it may very well be possible. And while I know not everyone publishes them, I strongly recommend doing so.
But honestly, ship your sources with your generated files. Please.
would be nice if you could somehow reverse the compilation of your build back into a source folder, instead of having node_modules - but i think that's probably not possible.