parcel-bundler / source-map

A fast source map manipulation, generation and consumption library written in Rust and Node.js
104 stars 15 forks source link

Support for Deno #110

Open binyamin opened 2 years ago

binyamin commented 2 years ago

Note: Coming from parcel-bundler/parcel-css#219

I haven't been able to get this module working for Deno

mischnic commented 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.

DeMoorJasper commented 2 years ago

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

mischnic commented 2 years ago

As already mentioned, that doesn't work for other reasons:

Bildschirmfoto 2022-07-04 um 10 19 23 Bildschirmfoto 2022-07-04 um 10 19 54
DeMoorJasper commented 2 years ago

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