-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dynamic imports don't work even with jsc.parser.dynamicImport set to true #1271
Comments
You should remove Anyway, this should be error... But it will be fixed by #1244. |
Am still running into this using the |
@traverse Can you show me your config? |
@kdy1 The config I was using is as follow {
loader: 'swc-loader',
options: {
jsc: {
target: 'es2015',
parser: {
syntax: 'typescript',
tsx: true,
dynamicImport: true,
classProperty: true,
exportNamespaceFrom: true,
exportDefaultFrom: true
}
}
}
} Like I said it's using Webpack with the |
@traverse I guess you should remove
Seems like a bug of napi-rs. |
I've tried several configurations also without those properties but it still kept showing the same error, I'll see if I can reproduce it again tomorrow. |
Same here. |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
Dynamic imports don't work even with
jsc.parser.dynamicImport
set to true. Meanwhile, the script below prints:Input code
Save the following contents as
/Users/myuser/test.ts
(or any other path as long as you update it in the script as well):and run the following code:
Config
Config is embedded in the script above.
Expected behavior
The code should compile.
Version
The version of @swc/core: 1.2.40
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: