Conversation
|
What about bundling for CDN? |
|
I like this, though it kinda goes against all the tools that are all minified. Honestly would be fine if they generated a source map for all builds rather than just development. |
It enhances debugging for package consumers
59d43f5 to
225483d
Compare
@neSpecc It is not needed to minify, jsdelivr.com does it for you when you request it. From https://www.jsdelivr.com/documentation:
@gkovats Can you please elaborate? In my experience the vast majority of packages you install through npm is not minified. Or if you're thinking of using the package through a CDN, in that case jsdelivr is handling that, providing you with source maps. See above answer and this SO thread for more context; https://stackoverflow.com/a/48673965/2014510. |
|
For example when going to the already published CDN version (https://cdn.jsdelivr.net/npm/@editorjs/editorjs@2.26.5/dist/editor.min.js) you see this; |
|
Was just saying for our project, we did run into the same problem with bundling, ended up just concatenating editor.js files. In truth think it's best to include all in your dist - minified, expanded, source maps. Just that if they do this for core, it should / would need to be done for editor.js tools as well. They're all minified as well. |


Minifying a package published on NPM is generally not needed. The project that installs the package usually has a minifier that takes care of that.
Advantages of not minifying;