Add ESM installation method#12
Add ESM installation method#12TomasHubelbauer wants to merge 1 commit intophotopea:masterfrom TomasHubelbauer:patch-1
Conversation
|
EDIT: What I said above still applies for build tooling, but importing directly from the browser with ES Modules is now actually possible, so this would be a useful addition. |
|
I am using ESM in Safari, Firefox, Chrome and Edge in my plain Javascript projects daily. Not sure what you mean about the lack of support. Can you elaborate? Bundling and tree shaking IMO is beside the point here as I'm specifically using ESM to avoid needing to use any bundler or compiler. I write plain JS, save and reload. ESM is useful today. Edit: I believe I still address your post even when edited, the main point being that this is specifically to support scenarios where additional web dev tooling is not used, plain JS is. |
Hi! I really like UZIP.js, thanks for making it! I used to just drop it in my project and call it a day, but recently I've been really getting into ESM (ES Modules - using
importandexportto refer to other scripts). This is not to be confused with CJS, AMD and other import/export solutions which require compilers and bundlers. ESM is a browser standard and can be used from plain JavaScript. I decided to make UZIP.js available as an ESM module so that I and other people can use it this modern way.In this PR I contribute an installation method using my ESM module to the readme. The module is automatically updated daily so it will automatically contain any new changes you make in
UZIP.jswithout needing anyone to manually update it. This should save you the influx of issues requesting you update the ESM version like we can see with the NPM version uploaded once by someone else and then not updated anymore.Hope you like this and all the best!