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(react): fix external option for @emotion/react #7870

Merged

Conversation

puku0x
Copy link
Contributor

@puku0x puku0x commented Nov 24, 2021

Current Behavior

Both react/jsx-runtime and@emotion/react/jsx-runtime are included in the outputs of buildable libraries.

import { jsx as jsx$1, jsxs as jsxs$1 } from 'react/jsx-runtime';
import _styled from '@emotion/styled/base';
import { cx } from '@emotion/css';

// 👇 Entire code of @emotion/react/jsx-runtime is included! 😱
/*

Based off glamor's StyleSheet, thanks Sunil ❤️

high performance StyleSheet for css-in-js systems

- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance

// usage

import { StyleSheet } from '@emotion/sheet'
:

Expected Behavior

Instead of react/jsx-runtime, @emotion/react/jsx-runtime should be imported in the outputs of the projects using Emotion.

import { jsxs, jsx } from '@emotion/react/jsx-runtime';
import _styled from '@emotion/styled/base';  // 👈 They are automatically imported
import { cx } from '@emotion/css';           // 👈

Related Issue(s)

#7395

@vercel
Copy link

vercel bot commented Nov 24, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/AW3EsWEL5aVeqLgXbteA3RPzrsmd
✅ Preview: Canceled

[Deployment for 02e7f76 canceled]

@nx-cloud
Copy link

nx-cloud bot commented Nov 24, 2021

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d0b3fbf. 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 13 targets

Sent with 💌 from NxCloud.

@puku0x puku0x marked this pull request as ready for review November 24, 2021 23:12
@puku0x puku0x marked this pull request as draft November 29, 2021 01:38
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from 5a0f054 to f085c81 Compare November 29, 2021 02:52
@puku0x puku0x marked this pull request as ready for review November 29, 2021 03:54
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from f085c81 to ad73986 Compare December 5, 2021 15:57
packages/react/migrations.json Outdated Show resolved Hide resolved
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from ad73986 to 10b63f0 Compare December 5, 2021 16:04
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from 10b63f0 to ec7bb99 Compare December 5, 2021 16:11
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from ec7bb99 to 05c92bc Compare December 10, 2021 16:05
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from 05c92bc to cf61d5f Compare December 11, 2021 00:31
@vsavkin vsavkin force-pushed the master branch 2 times, most recently from 3a99403 to 334c230 Compare January 6, 2022 18:35
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from cf61d5f to 8a9a16c Compare January 28, 2022 15:43
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from 8a9a16c to 6136c87 Compare March 21, 2022 06:24
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from 6136c87 to 02e7f76 Compare March 21, 2022 06:30
@puku0x puku0x force-pushed the fix-react-library-external-emotion-jsx-runtime branch from 02e7f76 to d0b3fbf Compare April 29, 2022 05:50
@vercel
Copy link

vercel bot commented Apr 29, 2022

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

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Apr 29, 2022 at 5:53AM (UTC)

@jaysoo jaysoo merged commit a2c22eb into nrwl:master May 30, 2022
@puku0x puku0x deleted the fix-react-library-external-emotion-jsx-runtime branch May 31, 2022 06:16
@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 Mar 18, 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.

None yet

2 participants