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
The loader configuration is as follows
swc-loader Set decorators: true,Compile without any errors,But The menu bar is blank because the @unobservable@computed@action decoration symbol is not correctly recognized
Remove the @ unobservable @ computed @ action decoration from the code, and the page will display normally
Hello @fandywen, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.
System Info
System Info
System:
MacBook Pro (13-inch, M1, 2020)
Memory:16 GB
Binaries:
Node: 18.15.0
npm: 9.5.0
Browsers:
Chrome: 131.0.6778.140
npmPackages:
@rspack/cli: ^1.1.6 => 1.1.6
@rspack/core: ^1.1.6 => 1.1.6
mobx:^5.15.7 => 5.15.7
mobx-react:^6.3.1 => 6.3.1
react:^17.0.1 => 17.0.1
react-dom:^17.0.1 => 17.0.1
Details
React +Mobx
The loader configuration is as follows
swc-loader Set decorators: true,Compile without any errors,But The menu bar is blank because the @unobservable @computed @action decoration symbol is not correctly recognized
Remove the @ unobservable @ computed @ action decoration from the code, and the page will display normally
{
test: /.(j|t)s(x)?$/,
exclude: /node_modules/,
loader: 'builtin:swc-loader',
options: {
// js/ts编译配置
jsc: {
parser: {
// 开启ts编译
syntax:'typescript',
// 开启tsx编译
tsx: true,
// 开启@装饰器编译
decorators: true,
// 动态import
dynamicImport: true,
},
transform: {
// react运行环境配置
react: {
// dev模式打开development启动react的开发模式
development: isDevelopment,
refresh: isDevelopment,
},
// stage 1 的旧版本class decorators
legacyDecorator: true,
// 支持 ts emitDecoratorMetadata
// decoratorMetadata: true,
},
},
},
Reproduce link
No response
Reproduce Steps
Compile without any errors
But The menu bar is blank
Remove the @ unobservable @ computed @ action decoration from the code, and the page will display normally
The text was updated successfully, but these errors were encountered: