Open binyamin opened 2 years ago
This would be nice, and fixing this would also enable importing it directly in browsers via the CDNs.
We'd just need a pure ESM version of https://unpkg.com/browse/@parcel/source-map@2.0.5/dist/wasm.js and its dependencies. And it would have to use wasm-bindings-web.js
The source uses typescript syntax (import type) with a .js extension
That's actually Flow syntax.
Not sure if we should ship an extra large bundle to support this, I think you can already load it using esm.sh
, something like: https://esm.sh/@parcel/source-map@2.0.5/dist/wasm.js
As already mentioned, that doesn't work for other reasons:
That's not up to us to fix that right? Seems like an esm.sh issue?
But I guess it's not a big deal for us to also ship esm as the js size is so small anyway. Which should be easy to fix. Might look into it tonight
Note: Coming from parcel-bundler/parcel-css#219
I haven't been able to get this module working for Deno
import type
) with a.js
extension. Deno can't read it properlyrequire
), but Deno uses ESM (import
)