You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamically importing files and modules in the code will lead swc to believe the module or file is unused and omit it during compilation. Even if dynamicImport is set to true in parser options.
Describe the bug
Dynamically importing files and modules in the code will lead swc to believe the module or file is unused and omit it during compilation. Even if
dynamicImport
is set to true in parser options.Input code
Config
Playground link (or link to the minimal reproduction)
https://github.com/Larsundso/swc-dynamic-import
SWC Info output
-- OS 1
-- OS 2
Expected behavior
lang.json should be compiled into /dist
the program should log its contents into the console
Actual behavior
lang.json is missing from /dist
the program fails with the following error
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/swc-dynamic-import/dist/lang.json' imported from /swc-dynamic-import/dist/index.js
Version
1.6.12-nightly-20240706.1
Additional context
No response
The text was updated successfully, but these errors were encountered: