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

GH-152: Use ES-module import syntax #154

Closed
wants to merge 1 commit into from
Closed

Conversation

CMDJojo
Copy link
Member

@CMDJojo CMDJojo commented Mar 12, 2023

This PR changes the compiler.js to import the bindings using the more modern ES-module syntax. This is supported by all major browsers but Firefox, which will get it in version 111, released March 14th. After we confirm that this works, we should thus merge this PR.

It also changes main.js to have the extension mjs for JavaScript module, needed for support in MacOS.

Resolves GH-152

@github-actions
Copy link

github-actions bot commented Mar 12, 2023

PR Preview Action v1.3.0
Preview removed because the pull request was closed.
2023-03-12 19:55 UTC

@CMDJojo
Copy link
Member Author

CMDJojo commented Mar 12, 2023

This does work on Firefox 111.0 (beta) but is locked behind the dom.workers.modules.enabled flag (disabled by default). So, this will require users to change default settings to get it to work. I think we should hold off on changing this for the time being, until it actually has support without changing flags. Closing this PR for now.

@CMDJojo
Copy link
Member Author

CMDJojo commented Mar 14, 2023

Confirmed to still be locked behind that flag on Firefox 111.0 Stable Release

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

Successfully merging this pull request may close these issues.

Use ES module for the web worker in playground
1 participant