Comments (12)
tracking list of panic cases related to swc-plugins:
from rspack.
Thanks for reporting this issue to us.
This happens if the plugin's SWC version not compatible with rspack's. There's an AST breaking change introduced in the latest version of swc. For SWC version in rspack 0.5.8, you may now use plugins of version 1.5.113. We would add some version checks to prevent this and guide user to use the corresponding version.
from rspack.
Thanks @h-a-n-a, I'm not clear on what the 1.5.113 version refers to and is this a change the plugin maintainers would need to make?
Thanks for reaching out. It's the version of official plugins provided by swc. For current Rspack version v0.5.8, If It's provided by the third party author, You have to check if the crate swc_core
version of that wasm plugin is between 0.88.x ~ 0.89.x
.
The biggest difference between @swc/core
(the npm package), which is used with swc-loader
and builtin:swc-loader
is the prior option allows you to switch the suitable @swc/core
version, however the latter one doesn't.
from rspack.
Ok, so for swc-plugin-coverage-instrument
swc_core = { version = "0.90.7" }
So that means I would need to wait for an
rspack
update to use that plugin because there's an API breaking change in SWC?
Yes, or you can downgrade to plugin of the version within that range.
from rspack.
@h-a-n-a cc~
from rspack.
Seeing a runtime panic when trying to use https://github.com/kwonoj/swc-plugin-coverage-instrument:
● Client ━━━━━━━━━━━━━━━━━━━━━━━━━ (50%) building /.../node_modules/validator/lib/isFloat.js Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message: failed to invoke plugin: failed to invoke plugin on 'Some("/.../src/app/application.tsx")'
Caused by:
0: failed to invoke `swc-plugin-coverage-instrument` as js transform plugin at swc-plugin-coverage-instrument
1: RuntimeError: out of bounds memory access
Location: /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.6/src/plugin.rs:162
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: _napi_register_module_v1
at <unknown source file>
2: _napi_register_module_v1
at <unknown source file>
3: _napi_register_module_v1
at <unknown source file>
4: _napi_register_module_v1
at <unknown source file>
5: _napi_register_module_v1
at <unknown source file>
6: _wasmer_vm_imported_memory32_atomic_notify
at <unknown source file>
7: _wasmer_vm_imported_memory32_atomic_notify
at <unknown source file>
8: _napi_register_module_v1
at <unknown source file>
9: _napi_register_module_v1
at <unknown source file>
10: _napi_register_module_v1
at <unknown source file>
11: _napi_register_module_v1
at <unknown source file>
12: _napi_register_module_v1
at <unknown source file>
13: _napi_register_module_v1
at <unknown source file>
14: _napi_register_module_v1
at <unknown source file>
15: _napi_register_module_v1
at <unknown source file>
...
from rspack.
Thanks @h-a-n-a, I'm not clear on what the 1.5.113 version refers to and is this a change the plugin maintainers would need to make?
from rspack.
@h-a-n-a I have a similar problem. If using other plugins like swc-plugin-auto-css-modules, how do I choose which version to use? Is there any corresponding guidance for the swc version used by rspack?
from rspack.
Ok, so for swc-plugin-coverage-instrument
swc_core = { version = "0.90.7" }
So that means I would need to wait for an rspack
update to use that plugin because there's an API breaking change in SWC?
from rspack.
I tried a few versions of swc-plugin-coverage-instrument
but they seem to all cause an error during build. I think I can use babel-plugin-istanbul
in the mean time (build time goes up from 15s to 2min :) but we don't need coverage builds as often).
Thanks for all the work on rspack
, it's been so much easier to migrate from webpack than vite and performance is incredible.
from rspack.
I tried a few versions of
swc-plugin-coverage-instrument
but they seem to all cause an error during build. I think I can usebabel-plugin-istanbul
in the mean time (build time goes up from 15s to 2min :) but we don't need coverage builds as often).Thanks for all the work on
rspack
, it's been so much easier to migrate from webpack than vite and performance is incredible.
@esturcke We're going to release a minor version of rspack next week. In this version, we bumped swc_core
to the latest version, which should support the latest version of swc-plugin-coverage-instrument
. #6009.
from rspack.
This issue would be closed. For followup plugin selections, please refer to https://swc.rs/docs/plugin/selecting-swc-core.
from rspack.
Related Issues (20)
- [Bug]: Some links on the built with rspack sections dont work on mobile HOT 1
- [Bug]: image in css (css-loader) removes from dev-server after update some file
- [Bug]: The source map is not working on Sentry HOT 30
- [Feature]: hope the bundled output filename and the path injected into the CSS are different HOT 8
- [Feature]: support build performance hint
- [Bug]: Minimizing CSS using lightningcss may shuffle the CSS property order
- [Feature]: Add `loc` to `chunkGroup.origins[]` OR expose import statement source/comments HOT 2
- [Bug]: failed to render template from string: ReferenceError: process is not defined HOT 4
- [Bug]: Chunks hashes calculated with errors HOT 4
- [Bug]: Unable to exclude CSS files from LightningCssMinimizerRspackPlugin or to silence warnings
- Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './compiled/webpack-sources/index' is not defined by "exports" HOT 1
- [Bug]: `this.sourceMap` in the LoaderContext is `false` when using SourceMapDevToolPlugin
- [Bug]: When using a worker with lazyCompilation enabled, a compilation error occurs.
- [Bug]: Rspack does not rebuild when modifying pure type files HOT 1
- [Bug]: license-webpack-plugin will not replace "[name]" in "outputFilename"
- [Bug]: Missing typings for `externals` function (zod types not inferred correctly) HOT 2
- [Tracking]: Could not find any entry module, please make sure that src/index.(ts|js|tsx|jsx|mjs|cjs) exists, or customize entry through the source.entry configuration. HOT 1
- [Bug]: broken caused by `@rspack/lite-tabable` reading a property from `undefined` HOT 1
- [Bug]: The progress bar did not reach 100% after the compilation was completed
- [Bug]: [content-hash] changes when building same image twice HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rspack.