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

Codesandbox.io doesn't respect package.json import conditions #183

Closed
mehmetron opened this issue Jun 24, 2024 · 3 comments
Closed

Codesandbox.io doesn't respect package.json import conditions #183

mehmetron opened this issue Jun 24, 2024 · 3 comments

Comments

@mehmetron
Copy link

mehmetron commented Jun 24, 2024

First off, thanks for making this library publicly available! It's awesome!

The full error is:

Uncaught SyntaxError: Cannot use 'import.meta' outside a module
at eval ()
at z (sandbox.275a9407e.js:1:94080)
at K.evaluate (sandbox.275a9407e.js:1:106841)
at ve. (sandbox.275a9407e.js:1:115700)
at Generator.next ()
at i (sandbox.275a9407e.js:1:112149)

Sandbox where error takes place: https://codesandbox.io/p/sandbox/quickjs-emscription-forked-z48jf6

Sandbox with old version that works: https://codesandbox.io/p/sandbox/quickjs-emscription-pgf0f

Are you guys also getting this error? Didn't seem like it was related to my main javascript code but, instead, related to the wasm runtime

@mehmetron
Copy link
Author

Version 0.24.0 seems to be the last version before things start breaking in this sandbox:

https://codesandbox.io/p/sandbox/quickjs-emscription-forked-94k495

@sradu
Copy link

sradu commented Jul 3, 2024

@mehmetron is this other issue helpful #151? I believe I ran into that too.

@justjake
Copy link
Owner

justjake commented Jul 3, 2024

Yeah, I recommend the single file builds if the multifile ones don’t work well for you. Since this is a continued issue, I may reverse the defaults back to “singlefile”. The split build does have better instantiation performance since it can be cached by the browser but it requires a very “modern” JavaScript built pipelin

@justjake justjake changed the title Getting javascript modules error on latest release Codesandbox.io doesn't respect package.json import conditions Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants