-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Bare Imports fail when using CJS format #4050
Labels
Comments
Presumably, we just need to handle the case here of |
Conduitry
added a commit
to Conduitry/sveltejs_svelte
that referenced
this issue
Dec 4, 2019
Conduitry
added a commit
to Conduitry/sveltejs_svelte
that referenced
this issue
Dec 4, 2019
Conduitry
added a commit
to Conduitry/sveltejs_svelte
that referenced
this issue
Dec 4, 2019
Wow thank you for the swift response and PR already! |
Conduitry
added a commit
that referenced
this issue
Dec 4, 2019
Fixed in 3.16.1. |
taylorzane
pushed a commit
to taylorzane/svelte
that referenced
this issue
Dec 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using a bare import in a component script (also with script in module context as in thsi example) there are no specifiers on the node at this line which causes this error:
TypeError: Cannot read property 'type' of undefined
To Reproduce
a.js
:// any code here - empty is fine too
Component.svelte
:compile.js
:Expected behavior
Should compile and generate
require('./a.js');
in the example provided above.Stacktrace
Information about your Svelte project:
Not relevant but I'm using Svelte v3.16.0
Severity
Blocking - I'm using Jest for testing which requires
cjs
format withjest-transform-svelte
which forcescjs
format which breaks on compile when using a bare import.The text was updated successfully, but these errors were encountered: