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(js): update generated .swcrc file to align with @swc/[email protected] #19214

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Sep 18, 2023

This PR fixes an issue with .swcrc using options that are now invalid in @swc/[email protected]. When module.type is es6, the strict and noInterop options cannot be set.

The point is to transpile the library with interop between CJS and ESM, and tests show that the resulting output are the same regardless of these options (even in @swc/[email protected]). The following is the expected output, and removing the options don't affect it.

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

function foo() {
    return 'foo';
}

exports.foo = foo;

See: swc-project/swc@7e8d72d

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@jaysoo jaysoo requested a review from a team as a code owner September 18, 2023 14:40
@jaysoo jaysoo requested a review from mandarini September 18, 2023 14:40
@vercel
Copy link

vercel bot commented Sep 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2023 0:31am

@jaysoo jaysoo requested a review from FrozenPandaz September 18, 2023 16:17
@jaysoo jaysoo force-pushed the fix/swcrc-options branch 2 times, most recently from 32ca8e5 to e62cb20 Compare September 18, 2023 18:31
@jaysoo jaysoo requested a review from a team as a code owner September 18, 2023 18:31
@jaysoo jaysoo closed this Sep 20, 2023
@jaysoo jaysoo reopened this Sep 20, 2023
@jaysoo jaysoo requested a review from vsavkin as a code owner September 21, 2023 16:32
@jaysoo jaysoo force-pushed the fix/swcrc-options branch 2 times, most recently from 58024ee to bce1700 Compare September 21, 2023 18:05
@FrozenPandaz FrozenPandaz merged commit 903c4fe into nrwl:master Sep 22, 2023
2 checks passed
@jaysoo jaysoo deleted the fix/swcrc-options branch September 22, 2023 12:25
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants