Skip to content
New issue

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

[Bug]: addInitializer missing on class field decorators when I use builtin:swc-loader #9738

Open
chenshengshui opened this issue Mar 19, 2025 · 0 comments
Assignees
Labels
pending triage The issue/PR is currently untouched.

Comments

@chenshengshui
Copy link

System Info

System:
OS: macOS 15.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 33.03 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
pnpm: 7.9.3 - ~/.nvm/versions/node/v18.17.0/bin/pnpm
Browsers:
Chrome: 134.0.6998.89
Safari: 18.3
npmPackages:
@rspack/cli: ^1.2.8 => 1.2.8
@rspack/core: ^1.2.8 => 1.2.8
@rspack/plugin-react-refresh: ^0.7.5 => 0.7.5

Details

function bar(_, ctx) {
console.log("should not be undefined", ctx.addInitializer);
}
class Foo {
@bar baz = 1
}

new Foo()

Reproduce link

swc-project/swc#8525

Reproduce Steps

swc-project/swc#8525

@chenshengshui chenshengshui added the pending triage The issue/PR is currently untouched. label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

2 participants