use same esm version for dependencies
Failing module
when accessing https://esm.sh/v64/@mui/[email protected]?alias=react:preact/compat,react-dom:preact/compat,react/jsx-runtime:preact/jsx-runtime&[email protected]&target=es2020 and recursively looking into the imports, you will find that the preact is imported from esm.sh/stable instead of esm.sh/v64
This is crucial, as esm.sh unfortunately introduces new bugs (I have one right which I cannot minify yet but it is not occuring where I cached esm.sh resources and is occuring where I cleared the cache)
To reliable pin an esm version, using the same version for dependencies is essential.
For UI libraries like React and Vue, esm.sh uses a special build version
stableto ensure single version of the library is used in the whole application.
i think this actions as expected.
yes, I like that all can refer to the same version, however it is suboptimal that one always need to rely on the latest esm.sh version. (as there is always only one "stable", i.e. the latest)
Currently the new version of "stable" completely broke my setup and I moved away from esm.sh as a consequence.
sorry for the break change, let me make it clear, the stable means we locked the import path, you still can specify different version of these packages. eg:
https://esm.sh/react -> https://esm.sh/react@latest -> https://esm.sh/[email protected] -> https://esm.sh/stable/[email protected]
https://esm.sh/react@17 -> https://esm.sh/[email protected] -> https://esm.sh/stable/[email protected]
yes, I fixed it to preact 10.6.6 like seen above, which was not enough to prevent the break
hence the issue, as it would be great to also pin these react/preact combos to a specific esm.sh version like esm.sh/v66
It is a year back, and I am thinking about going back to esm.sh, but find that the dependencies for preact and similar cannot be pinned. This is crucial, as apparently esm.sh introduced bugs back then and I want to prevent such breaking change on esm.sh side to crash my whole application.
Is there any further work on making dependencies like react/preact also pinnable?
in next build, build version like 'v135' or 'stable' will be removed. no pin needed then.
Sounds like @ije is cooking! Let him cook 🔥