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
As I need to install packages, I can't give an example on the playground.
However, I hosted a minimal example with every step to reproduce it in local.
failed to load file
Caused by:
stream did not contain valid UTF-8
failed to load file
Caused by:
stream did not contain valid UTF-8
Successfully compiled: 1 file with swc (70.04ms)
Failed to compile 2 files with swc.
Error: Failed to compile:
backend/node_modules/map-or-similar/map-or-similar.min.gzip.js
backend/node_modules/memoizerific/memoizerific.min.gzip.js
at initialCompilation (/swc-bug-node_modules-interfer/backend/node_modules/@swc/cli/lib/swc/dir.js:163:19)
at async dir (/swc-bug-node_modules-interfer/backend/node_modules/@swc/cli/lib/swc/dir.js:228:5)
# exited with code 1
Version
1.3.53
Additional context
I chose memoizerific package to make swc fail, but it can happen with other packages.
Also, I noted that node_modules don't behave as excluded and impact significantly performances.
Interesting note: If I remove node_module from the exclude list, I have way more errors. It demonstrates that swc ignores most of node_modules files, but not everything. The error is not my .swcrc exclude list config.
The content you are editing has changed. Please copy your edits and refresh the page.
Describe the bug
Even if I put
node_modules
in theexclude
(doc) config list, it can behave inconsistently:As I need to install packages, I can't give an example on the playground.
However, I hosted a minimal example with every step to reproduce it in local.
Input code
Config
Playground link
https://github.com/pp0rtal/swc-bug-node_modules-interfer
(See readme to reproduce in seconds on your machine)
Expected behavior
Actual behavior
Version
1.3.53
Additional context
I chose
memoizerific
package to make swc fail, but it can happen with other packages.Also, I noted that
node_modules
don't behave as excluded and impact significantly performances.Interesting note: If I remove
node_module
from the exclude list, I have way more errors. It demonstrates that swc ignores most ofnode_modules
files, but not everything. The error is not my.swcrc
exclude list config.Tasks
The text was updated successfully, but these errors were encountered: