When I run my project by npm run dev
And console shows
ERROR in ./index.js
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: failed to process input file
Caused by:
0: failed to read swcrc file (D:\html-test\vue-component\index.js)
1: failed to deserialize .swcrc (json) file: unmatched data: 0:0
2: unknown field `experimental`, expected one of `env`, `test`, `exclude`, `jsc`, `module`, `minify`, `inputSourceMap`, `sourceMaps`, `inlineSourcesContent`, `emitSourceMapColumns`, `error`, `isModule`, `$schema`
ERROR in ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=8080&pathname=%2Fws&logging=info&overlay=true&reconnect=10&hot=true&live-reload=true
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: failed to process input file
Caused by:
0: failed to read swcrc file (D:\html-test\vue-component\node_modules\webpack-dev-server\client\index.js)
1: failed to deserialize .swcrc (json) file: unmatched data: 0:0
2: unknown field `experimental`, expected one of `env`, `test`, `exclude`, `jsc`, `module`, `minify`, `inputSourceMap`, `sourceMaps`, `inlineSourcesContent`, `emitSourceMapColumns`, `error`, `isModule`, `$schema`
ERROR in ./node_modules/webpack/hot/dev-server.js
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: failed to process input file
Caused by:
0: failed to read swcrc file (D:\html-test\vue-component\node_modules\webpack\hot\dev-server.js)
1: failed to deserialize .swcrc (json) file: unmatched data: 0:0
2: unknown field `experimental`, expected one of `env`, `test`, `exclude`, `jsc`, `module`, `minify`, `inputSourceMap`, `sourceMaps`, `inlineSourcesContent`, `emitSourceMapColumns`, `error`, `isModule`, `$schema`
webpack 5.74.0 compiled with 3 errors in 1213 ms
And then I change the .swcrc config. Set the plugin to **jsc**.experimental.plugins
And console shows that:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', C:\Users\xyh\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\rkyv-0.7.37\src\impls\core\mod.rs:265:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', C:\Users\xyh\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\rkyv-0.7.37\src\impls\core\mod.rs:265:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'thread '<unnamed><unnamed>' panicked at '' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("D:\\html-test\\vue-component\\index.js")'
Caused by:
0: failed to invoke `swc-plugin-transform-vue3-jsx` as js transform plugin at node_modules\swc-plugin-transform-vue3-jsx\wasm\swc_plugin_transform_vue3_jsx.wasm
1: RuntimeError: unreachable
at __rust_start_panic (<module>[3650]:0x26ebcd)
at rust_panic (<module>[3641]:0x26e8a1)
at std::panicking::rust_panic_with_hook::h5af4a166307aff48 (<module>[3640]:0x26e81e)
at std::panicking::begin_panic_handler::{{closure}}::h42a9871ead2de5e8 (<module>[3627]:0x26da84)
at std::sys_common::backtrace::__rust_end_short_backtrace::h42a6bde96d4a4a1f (<module>[3626]:0x26d9c3)
at rust_begin_unwind (<module>[3635]:0x26e16e)
at core::panicking::panic_fmt::h33d7d4c3033d60da (<module>[3741]:0x2755b3)
at core::result::unwrap_failed::h5d36bed23403009b (<module>[3790]:0x27c9aa)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::hee071365124018f7 (<module>[616]:0x9e588)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::h8a52658b03ad48cd (<module>[796]:0xbbe0b)
at swc_common::plugin::serialized::PluginSerializedBytes::deserialize::h7ddc6846d758ad97 (<module>[332]:0x55773)
at swc_common::plugin::serialized::deserialize_from_ptr::h6ff5de1a9851235b (<module>[331]:0x55507)
at __transform_plugin_process_impl (<module>[633]:0x9f4b3)
at __transform_plugin_process_impl.command_export (<module>[3877]:0x282843)
2: unreachablethread 'failed to invoke plugin: failed to invoke plugin on 'Some("D:\\html-test\\vue-component\\node_modules\\webpack-dev-server\\client\\index.js")'
Caused by:
0: failed to invoke `swc-plugin-transform-vue3-jsx` as js transform plugin at node_modules\swc-plugin-transform-vue3-jsx\wasm\swc_plugin_transform_vue3_jsx.wasm
1: RuntimeError: out of bounds memory access
at memcpy (<module>[3691]:0x2728a1)
at <swc_atoms::EncodeJsWord as rkyv::with::DeserializeWith<<alloc::string::String as rkyv::Archive>::Archived,string_cache::atom::Atom<swc_atoms::JsWordStaticSet>,D>>::deserialize_with::hbbe23ffa24ec7b13 (<module>[315]:0x53e68)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::hdbbc5437aae83928 (<module>[180]:0x2ac70)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::h8a52658b03ad48cd (<module>[796]:0xbbc2b)
at swc_common::plugin::serialized::PluginSerializedBytes::deserialize::h7ddc6846d758ad97 (<module>[332]:0x55773)
at swc_common::plugin::serialized::deserialize_from_ptr::h6ff5de1a9851235b (<module>[331]:0x55507)
at __transform_plugin_process_impl (<module>[633]:0x9f4b3)
at __transform_plugin_process_impl.command_export (<module>[3877]:0x282843)
2: heap_get_oob', ', <unnamed>C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.237.1\src\plugin.rsC:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.237.1\src\plugin.rs' panicked at '::failed to invoke plugin: failed to invoke plugin on 'Some("D:\\html-test\\vue-component\\node_modules\\webpack\\hot\\dev-server.js")'
Caused by:
0: failed to invoke `swc-plugin-transform-vue3-jsx` as js transform plugin at node_modules\swc-plugin-transform-vue3-jsx\wasm\swc_plugin_transform_vue3_jsx.wasm
1: RuntimeError: unreachable
at __rust_start_panic (<module>[3650]:0x26ebcd)
at rust_panic (<module>[3641]:0x26e8a1)
at std::panicking::rust_panic_with_hook::h5af4a166307aff48 (<module>[3640]:0x26e81e)
at std::panicking::begin_panic_handler::{{closure}}::h42a9871ead2de5e8 (<module>[3627]:0x26da84)
at std::sys_common::backtrace::__rust_end_short_backtrace::h42a6bde96d4a4a1f (<module>[3626]:0x26d9c3)
at rust_begin_unwind (<module>[3635]:0x26e16e)
at core::panicking::panic_fmt::h33d7d4c3033d60da (<module>[3741]:0x2755b3)
at core::result::unwrap_failed::h5d36bed23403009b (<module>[3790]:0x27c9aa)
at swc_ecma_ast::stmt::_::<impl rkyv::Deserialize<swc_ecma_ast::stmt::Stmt,__D> for <swc_ecma_ast::stmt::Stmt as rkyv::Archive>::Archived>::deserialize::h8de37e391cd35ce2 (<module>[119]:0x1ecc0)
at swc_ecma_ast::stmt::_::<impl rkyv::Deserialize<swc_ecma_ast::stmt::Stmt,__D> for <swc_ecma_ast::stmt::Stmt as rkyv::Archive>::Archived>::deserialize::h8de37e391cd35ce2 (<module>[859]:0xd4765)
at rkyv::impls::alloc::boxed::<impl rkyv::Deserialize<alloc::boxed::Box<T>,D> for rkyv::boxed::ArchivedBox<<T as rkyv::ArchiveUnsized>::Archived>>::deserialize::hc86113c77e42016d (<module>[860]:0xd6187)
at swc_ecma_ast::stmt::_::<impl rkyv::Deserialize<swc_ecma_ast::stmt::Stmt,__D> for <swc_ecma_ast::stmt::Stmt as rkyv::Archive>::Archived>::deserialize::h8de37e391cd35ce2 (<module>[859]:0xd4ad3)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::h8a52658b03ad48cd (<module>[796]:0xbce41)
at swc_common::plugin::serialized::PluginSerializedBytes::deserialize::h7ddc6846d758ad97 (<module>[332]:0x55773)
at swc_common::plugin::serialized::deserialize_from_ptr::h6ff5de1a9851235b (<module>[331]:0x55507)
at __transform_plugin_process_impl (<module>[633]:0x9f4b3)
at __transform_plugin_process_impl.command_export (<module>[3877]:0x282843)
2: unreachable228228', :C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\swc-0.237.1\src\plugin.rs14::
14228note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
:14
2 assets
12 modules
ERROR in ./index.js
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("D:\\html-test\\vue-component\\index.js")'
Caused by:
0: failed to invoke `swc-plugin-transform-vue3-jsx` as js transform plugin at node_modules\swc-plugin-transform-vue3-jsx\wasm\swc_plugin_transform_vue3_jsx.wasm
1: RuntimeError: unreachable
at __rust_start_panic (<module>[3650]:0x26ebcd)
at rust_panic (<module>[3641]:0x26e8a1)
at std::panicking::rust_panic_with_hook::h5af4a166307aff48 (<module>[3640]:0x26e81e)
at std::panicking::begin_panic_handler::{{closure}}::h42a9871ead2de5e8 (<module>[3627]:0x26da84)
at std::sys_common::backtrace::__rust_end_short_backtrace::h42a6bde96d4a4a1f (<module>[3626]:0x26d9c3)
at rust_begin_unwind (<module>[3635]:0x26e16e)
at core::panicking::panic_fmt::h33d7d4c3033d60da (<module>[3741]:0x2755b3)
at core::result::unwrap_failed::h5d36bed23403009b (<module>[3790]:0x27c9aa)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::hee071365124018f7 (<module>[616]:0x9e588)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::h8a52658b03ad48cd (<module>[796]:0xbbe0b)
at swc_common::plugin::serialized::PluginSerializedBytes::deserialize::h7ddc6846d758ad97 (<module>[332]:0x55773)
at swc_common::plugin::serialized::deserialize_from_ptr::h6ff5de1a9851235b (<module>[331]:0x55507)
at __transform_plugin_process_impl (<module>[633]:0x9f4b3)
at __transform_plugin_process_impl.command_export (<module>[3877]:0x282843)
2: unreachable
ERROR in ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=8080&pathname=%2Fws&logging=info&overlay=true&reconnect=10&hot=true&live-reload=true
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("D:\\html-test\\vue-component\\node_modules\\webpack-dev-server\\client\\index.js")'
Caused by:
0: failed to invoke `swc-plugin-transform-vue3-jsx` as js transform plugin at node_modules\swc-plugin-transform-vue3-jsx\wasm\swc_plugin_transform_vue3_jsx.wasm
1: RuntimeError: out of bounds memory access
at memcpy (<module>[3691]:0x2728a1)
at <swc_atoms::EncodeJsWord as rkyv::with::DeserializeWith<<alloc::string::String as rkyv::Archive>::Archived,string_cache::atom::Atom<swc_atoms::JsWordStaticSet>,D>>::deserialize_with::hbbe23ffa24ec7b13 (<module>[315]:0x53e68)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::hdbbc5437aae83928 (<module>[180]:0x2ac70)
at rkyv::impls::core::<impl rkyv::DeserializeUnsized<[U],D> for [T]>::deserialize_unsized::h8a52658b03ad48cd (<module>[796]:0xbbc2b)
at swc_common::plugin::serialized::PluginSerializedBytes::deserialize::h7ddc6846d758ad97 (<module>[332]:0x55773)
at swc_common::plugin::serialized::deserialize_from_ptr::h6ff5de1a9851235b (<module>[331]:0x55507)
at __transform_plugin_process_impl (<module>[633]:0x9f4b3)
at __transform_plugin_process_impl.command_export (<module>[3877]:0x282843)
2: heap_get_oob
ERROR in ./node_modules/webpack/hot/dev-server.js
Module build failed (from ./node_modules/swc-loader/src/index.js):
Error: failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("D:\\html-test\\vue-component\\node_modules\\webpack\\hot\\dev-server.js")'
Caused by:
0: failed to invoke `swc-plugin-transform-vue3-jsx` as js transform plugin at node_modules\swc-plugin-transform-vue3-jsx\wasm\swc_plugin_transform_vue3_jsx.wasm
1: RuntimeError: unreachable
at __rust_start_panic (<module>[3650]:0x26ebcd)
at rust_panic (<module>[3641]:0x26e8a1)
at std::panicking::rust_panic_with_hook::h5af4a166307aff48 (<module>[3640]:0x26e81e)
at std::panicking::begin_panic_handler::{{closure}}::h42a9871ead2de5e8 (<module>[3627]:0x26da84)
at std::sys_common::backtrace::__rust_end_short_backtrace::h42a6bde96d4a4a1f (<module>[3626]:0x26d9c3)
at rust_begin_unwind (<module>[3635]:0x26e16e)
at core::panicking::panic_fmt::h33d7d4c3033d60da (<module>[3741]:0x2755b3)
at core::result::unwrap_failed::h5d36bed23403009b (<module>[3790]:0x27c9aa)
at swc_ecma_ast::stmt::_::<impl rkyv::Deserialize<swc_ecma_ast::stmt::Stmt,__D> for <swc_ecma_ast::stmt::Stmt as rkyv::Archive>::Archived>::deserialize::h8de37e391cd35ce2 (<module>[119]:0x1ecc0)
at swc_ecma_ast::stmt::_::<impl rkyv::Deserialize<swc_ecma_ast::stmt::Stmt,__D> for <swc_ecma_ast::stmt::Stmt as rkyv::Archive>::Archived>::deserialize::h8de37e391cd35ce2 (<module>[859]:0xd4765)
at rkyv::impls::alloc::boxed::<impl rkyv::Deserialize<alloc::boxed::Box<T>,D> for rkyv::boxed::ArchivedBox<<T as rkyv::ArchiveUnsized>::Archived>>::deserialize::hc86113c77e42016d (<module>[860]:0xd6187)
at swc_ecma_ast::stmt::_::<impl rkyv::Deserialize<swc_ecma_ast::stmt::Stmt,__D> for <swc_ecma_ast::stmt::Stmt as rkyv::Archive>::Archived>::deserialize::h8de37e391cd35ce2 (<module>[859]
Describe the bug
webpack@5.74.0 @swc/core@1.3.24 swc-loader@0.2.3 I used the swc config by npm README
When I run my project by
npm run dev
And console showsAnd then I change the
.swcrc
config. Set the plugin to**jsc**.experimental.plugins
And console shows that:
playground-url
No response
Expected generated code
No response