Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler not published as ESM? #179

Open
NullVoxPopuli opened this issue Jul 24, 2024 · 2 comments
Open

Compiler not published as ESM? #179

NullVoxPopuli opened this issue Jul 24, 2024 · 2 comments

Comments

@NullVoxPopuli
Copy link

NullVoxPopuli commented Jul 24, 2024

Just noticed this as I was poking around
image

image

How is this meant to be used in a browser, since browsers don't support commonjs?

might be related to #174

thanks!!

tho, maybe I don't know what's going on here -- esm.sh thinks there are exports

image

Searching through https://esm.sh/v135/[email protected]/es2022/dist/compiler.js
it's kind of hard to see what is actually exported, since so much content is in strings 😅

(turns out esm.sh is a better source viewer than npm haha)

@milomg
Copy link
Member

milomg commented Aug 11, 2024

The compiler is meant to be imported as a raw js file (and so is bundled fully, into what should basically be an iife) because esm support for workers was limited (missing in firefox) until recently

@NullVoxPopuli
Copy link
Author

is there a version of the compiler that would work with esm.sh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants