-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[wasm] drop cjs follow-up #72990
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue Details
|
Hi, Unsure if this is a good issue to comment on, but the change of always compiling to ES6 seems to break my build. I can't use Could you please advise? Thank you. |
@firasdib we are not going back to CommonJS. I would like to learn more about your problem with |
I am trying to run some compiled code in the browser, and it says I cannot use Specifically I am trying to use this in a web worker. |
Web workers in FF don't support ES6 yet and I think we don't support running dotnet on worker either. |
It works fine with the older preview build (currently whats running on regex101), but I am unable to update due to this limitation. The only way to load scripts in the worker is through Why can't you keep ES6 for your internal functions, but allow it to be compiled to cjs through a flag? ES6 was opt in before, but now its removed, making it not usable for me, which is extremely unfortunate. |
|
Can it not be transpiled to any version of ES? Not sure what I will try to find a manual way of managing this, otherwise I'm stumped at how to keep supporting .NET on regex101... |
Could you take |
I will fiddle with it and see what I can do! |
I managed to get it to work by transpiling it myself on my end. Now there seems to be a new issue where I can no longer bind my methods, Thanks for your help with this! |
I know that old parcelJs versions had an issue which damaged the dotnet.js internals during minification. Try latest. |
@firasdib please share more details how you made it work. I think others may have similar issues. |
@pavelsavara Sorry for the late reply. I had to include the file in my bundle and transpile it was part of my own code. I then had to mark a few items in it as externals, as webpack would otherwise complain that it could not find those dependencies. It adds some overall time to the compilation, and throws a few errors, but it works. |
-s EXPORT_ES6=1
to compilation or defaults .rspconsole-v8-es6
toconsole-v8
runtime\es6
v8 --module
tosrc\mono\sample\wasm\console-v8-es6\v8shim.cjs
test-main.js
ES6src\mono\wasm\host\JSEngineHost.cs
imports.isGlobal
fromexports.ts
https://bugzilla.mozilla.org/show_bug.cgi?id=1247687
The text was updated successfully, but these errors were encountered: