nx icon indicating copy to clipboard operation
nx copied to clipboard

feat(react): improve babel preset options

Open jasongerbes opened this issue 3 years ago • 2 comments

Improved the @nrwl/react/babel preset to allow for customisation of all options provided by the @nrwl/web/babel preset.

Current Behavior

Only the useBuiltIns option of the @nrwl/web/babel preset can be configured when using the @nrwl/react/babel preset:

{
    "presets": [
        [
            "@nrwl/react/babel",
            {
                "runtime": "automatic",
                "importSource": "react",
                "useBuiltIns": "usage"
            }
        ]
    ],
    "plugins": []
}

Expected Behavior

All options provided by the @nrwl/web/babel preset should be configurable when using the @nrwl/react/babel preset:

{
    "presets": [
        [
            "@nrwl/react/babel",
            {
                "runtime": "automatic",
                "importSource": "react",
                "useBuiltIns": "usage",
                "decorators": {
                    "decoratorsBeforeExport": true,
                    "legacy": false
                },
                "classProperties": {
                    "loose": false
                }
            }
        ]
    ],
    "plugins": []
}

Related Issue(s)

Fixes #10939

jasongerbes avatar Jun 28 '22 23:06 jasongerbes

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 644a9e3ccf04dd171ca1967e346b10e59f2e31dc. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 12 targets

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Jun 28 '22 23:06 nx-cloud[bot]

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

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Jun 28, 2022 at 11:45PM (UTC)

vercel[bot] avatar Jun 28 '22 23:06 vercel[bot]

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[bot] avatar Mar 17 '23 19:03 github-actions[bot]