You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently serve any package as ESM, and up-convert CJS packages to ESM. But, we don't currently convert individual CJS files to ESM. We originally didn't want to touch individual files that were referenced by path, since those imports are of a specific file. But, enough packages need that that I think it's better than the alternative.
I think one argument in favor of this, if it can be made to work reliably, is that the (proper) fix to upstream modules will often be a build change, which I find many upstream maintainers feel less that 100% comfortable applying a PR for, if they don't fully understand the build, or ESM. One of the reasons skypack is great is that hardly anyone actually groks webpack 😂
I suspect that Skypack is still too young to have "oh, that doesn't work on skypack, please apply this sometimes-hairy webpack change PR to fix your module pathway to properly work as ESM" fly with a lot of maintainers.
Ironically, as skypack builds momentuum it'll actually probably be easier to get upstreams to fix their packages..... but for now having a lot of common libraries importable may be worth holding nose for.
Resolves #34 #30
We currently serve any package as ESM, and up-convert CJS packages to ESM. But, we don't currently convert individual CJS files to ESM. We originally didn't want to touch individual files that were referenced by path, since those imports are of a specific file. But, enough packages need that that I think it's better than the alternative.
Example: https://cdn.skypack.dev/-/ipfs-utils@v2.3.1-HvR3d8q0I8sVAZxXiKua/dist=es2020,mode=raw/src/env.js
The text was updated successfully, but these errors were encountered: