We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
.js
I found that SWC mistakenly treats a folder with the .js suffix as a file, which introduces this bug:
$ ./swc-darwin-arm64-1.7.26 compile . Error: Failed to open file ./vendor/chart.js Caused by: Is a directory (os error 21)
Note that the binary is downloaded from the GitHub Releases:
wget https://github.com/swc-project/swc/releases/download/v1.7.26/swc-darwin-arm64 -O swc-darwin-arm64-1.7.26 && chmod +x swc-darwin-arm64-1.7.26
No response
https://github.com/pan93412/swc-minimum-repro
Operating System: Platform: darwin Arch: arm64 Machine Type: arm64 Version: Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:41 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6031 CPU: (16 cores) Models: Apple M3 Max Binaries: Node: 20.17.0 npm: 10.8.2 Yarn: N/A pnpm: N/A Relevant Packages: @swc/core: N/A @swc/helpers: N/A @swc/types: N/A SWC Config: output: N/A .swcrc path: N/A Next.js info: output: N/A
It should be able to build. For example, when I rename chart.js to charts:
chart.js
charts
$ mv vendor/chart.js/ vendor/chartjs $ ./swc-darwin-arm64-1.7.26 compile . ./vendor/chartjs/chart.js.min.js console.log("hi chart.js"); ./index.ts console.log("Hello");
$ mv vendor/chartjs vendor/chart.js $ ./swc-darwin-arm64-1.7.26 compile . Error: Failed to open file ./vendor/chart.js Caused by: Is a directory (os error 21)
1.7.26
The text was updated successfully, but these errors were encountered:
test(cli): Testcase for swc-project#9559
e535417
85cc2bd
kdy1
Successfully merging a pull request may close this issue.
Describe the bug
I found that SWC mistakenly treats a folder with the
.js
suffix as a file, which introduces this bug:Note that the binary is downloaded from the GitHub Releases:
Input code
No response
Config
No response
Playground link (or link to the minimal reproduction)
https://github.com/pan93412/swc-minimum-repro
SWC Info output
Expected behavior
It should be able to build. For example, when I rename
chart.js
tocharts
:Actual behavior
Version
1.7.26
Additional context
No response
The text was updated successfully, but these errors were encountered: