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

fix: update swc.ts to disable useDefineForClassFields option for swc #1968

Closed
wants to merge 1 commit into from

Conversation

vagusX
Copy link

@vagusX vagusX commented Mar 13, 2023

@swc/core@1.3.40 enable useDefineForClassFields

swc-project/swc#7065

@Graphmaxer
Copy link

Any update on this ? I'm stuck on SWC 1.3.39 without this.

@ldiqual
Copy link

ldiqual commented May 4, 2023

Same here, we're stuck on 1.3.39. I think it would be good to either read .swcrc, allow customizing the swc config, or set this default so that users can upgrade.

@RealityAnomaly
Copy link

Would really appreciate this merged in

@grundb
Copy link

grundb commented Jun 21, 2023

In my opinion, it seems like a better idea to respect the TS config and get the value from there. Many options are already extracted here:

const {
esModuleInterop,
sourceMap,
importHelpers,
experimentalDecorators,
emitDecoratorMetadata,
target,
module,
jsx,
jsxFactory,
jsxFragmentFactory,
strict,
alwaysStrict,
noImplicitUseStrict,
} = compilerOptions;
One could add useDefineForClassFields to this destructuring, then just pass it along to the line which this PR intends to change. I experimented a bit locally and it seemed to work.

@courage173
Copy link

Why can't this be merged in been stuck on 1.3.26 a long time

@cspotcode cspotcode mentioned this pull request Sep 14, 2023
@cspotcode
Copy link
Collaborator

Fixed via #2062

@cspotcode cspotcode closed this Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants