simonwep / selection

✨ Viselect - A high performance and lightweight library to add a visual way of selecting elements, just like on your Desktop. Zero dependencies, super small. Support for major frameworks!
https://simonwep.github.io/selection
MIT License
2.51k stars 147 forks source link

Viselect v3.2.3 under jsDelivr missing viselect.esm.js.map #189

Closed laukstein closed 1 year ago

laukstein commented 1 year ago

Viselect v3.2.3 released under jsDelivr https://cdn.jsdelivr.net/npm/@viselect/vanilla/lib/viselect.esm.js points to //# sourceMappingURL=viselect.esm.js.map but is missing the file under https://cdn.jsdelivr.net/npm/@viselect/vanilla/lib/viselect.esm.js.map, returns

{"version":3,"file":"viselect.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
simonwep commented 1 year ago

Seems to be a bigger issue (or rather - I'll refactor a lot to fix that). I'll switch entirely to vite for building it for production and refactor how the project is built next weekend! Should be fixed with that :)

This will also change the entry points of the library, so I guess this will be a new minor version.

simonwep commented 1 year ago

Fixed with changes in 411c2fc5a37adaa9a916b910e49cd2a4b96b7fe1 :)

simonwep commented 1 year ago

Just a quick heads up: with v3.2.4 the location of the files for jsdelivr changed, so instead of .esm.js it's now https://cdn.jsdelivr.net/npm/@viselect/vanilla/dist/viselect.mjs and https://cdn.jsdelivr.net/npm/@viselect/vanilla/dist/viselect.mjs.map!

laukstein commented 1 year ago

@Simonwep see my comment in https://github.com/Simonwep/selection/commit/411c2fc5a37adaa9a916b910e49cd2a4b96b7fe1#r95183137

No such file as https://cdn.jsdelivr.net/npm/@viselect/vanilla/dist/viselect.esm.js

simonwep commented 1 year ago

Ah, goddammit - I meant https://cdn.jsdelivr.net/npm/@viselect/vanilla/dist/viselect.mjs 🤦 I'll updated the README's tomorrow... This whole refactoring got me confused 😕

laukstein commented 1 year ago

@Simonwep what about *.esm.js file? No longer supported?

simonwep commented 1 year ago

.esm.js is now .mjs (the official extension for ES6 module files)... The common-js version is still using the .js extension (e.g. universal module Format -> .umd.js)

In the release I mentioned that this may be a breaking change for some, but the build setup was really old (going back to 2018)... So this should be now state of the art.

Is this a problem for you? If your using nginx you might have to manually specify the mime type for .mjs files...

laukstein commented 1 year ago

No problem. Tested and so far looks working fine.