-
-
Notifications
You must be signed in to change notification settings - Fork 672
Compiling esm esm cannot be used directly in the bundler module #2659
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
Comments
What bundler are you using? |
webpack5 |
I suppose the solution is to use |
Yes, the above code is just to ensure that the current compiled results work. |
Same problem.
In Chrome and Vivaldi works fine.
If I edit manually to
or to
it works.
main.ts:
But manual edits or calls through a global object are unnecessary work. |
Apparently some bundlers use objects with read-only properties for imported modules. This conflicts with Object.assign even though the object being assigned to only has read-only properties on its prototype. Regardless, if the assignment is done before the prototype is set, everything works just fine. Fixes AssemblyScript#2659
Apparently some bundlers use objects with read-only properties for imported modules. This conflicts with Object.assign even though the object being assigned to only has read-only properties on its prototype. Regardless, if the assignment is done before the prototype is set, everything works just fine. Fixes AssemblyScript#2659
Apparently some bundlers use objects with read-only properties for imported modules. This conflicts with Object.assign even though the object being assigned to only has read-only properties on its prototype. Regardless, if the assignment is done before the prototype is set, everything works just fine. Fixes AssemblyScript#2659
Bug description
Compiling esm code cannot be used directly in the bundler module,.e.g:



The Object.assign cant work. Because bundle module is not the same as browser esm.module export variable just only have getter.
Steps to reproduce
@external("../test","test")

3. I hava a Compatibility method,but i think Not good enough.AssemblyScript version
^0.27.0
The text was updated successfully, but these errors were encountered: