Skip to content

Emotion plugin does not support disabling cssPropOptimization #691

Backlog

Description

Describe the bug
The babel emotion plugin includes a cssPropOptimization prop config. in 14.7.0 and earlier, @swc/plugin-emotion never applied this optimization. In later versions it is enabled with no way to disable.

Repro (This repro shows the behavior in 3 versions of the plugin as well as in the babel plugin)

Expected behavior
When cssPropOptimization is set to false, css props in JSX elements should be left untouched. Something like <HStack css={{height: '100%'}} should pass the object to the component untouched. This is how it works in the babel version of this plugin.

Thank you! ❤️

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions