Skip to content

Fix emotion template literal minification#16197

Merged
Jakeii merged 7 commits into
mainfrom
jlk/fix-emotion-template-literal-2
Jun 23, 2026
Merged

Fix emotion template literal minification#16197
Jakeii merged 7 commits into
mainfrom
jlk/fix-emotion-template-literal-2

Conversation

@Jakeii

@Jakeii Jakeii commented Jun 17, 2026

Copy link
Copy Markdown
Member

This is a fixed version of #16184

Which had to be reverted, as there were some unexpected visual changes which weren't flagged by chromatic due to an earlier change that also had to be reverted.

What does this change?

Add the @swc/plugin-emotion plugin

Why?

emotion css using the template literal syntax does not get minified without a babel or swc plugin.

Screenshots

Before After
Screenshot 2026-06-17 at 10 50 47 Screenshot 2026-06-17 at 10 51 04
Screenshot 2026-06-17 at 10 50 41 Screenshot 2026-06-17 at 10 50 58
Screenshot 2026-06-17 at 10 51 27 Screenshot 2026-06-17 at 10 51 16
Screenshot 2026-06-17 at 10 51 42 Screenshot 2026-06-17 at 10 51 50

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

@Jakeii Jakeii force-pushed the jlk/fix-emotion-template-literal-2 branch from 159366f to 6e48705 Compare June 17, 2026 16:28
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 18, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 18, 2026
@Jakeii Jakeii force-pushed the jlk/fix-emotion-template-literal-2 branch from 6e48705 to 04113fe Compare June 18, 2026 08:14
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 18, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 18, 2026
@Jakeii Jakeii added the fix Departmental tracking: fix label Jun 18, 2026
};

const liveBlockContainerStyles = () => css`
const liveBlockContainerStyles = css`

@Jakeii Jakeii Jun 18, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure how this even worked before, but it doesn't with the swc plugin!

This function wasn't called when used down on line 161

@Jakeii Jakeii changed the title fix emotion template literal minification Fix emotion template literal minification Jun 18, 2026
@Jakeii Jakeii marked this pull request as ready for review June 18, 2026 09:57
@Jakeii Jakeii requested a review from a team as a code owner June 18, 2026 09:57
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 18, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 18, 2026
@Jakeii Jakeii added this to the Health milestone Jun 22, 2026
@Jakeii Jakeii self-assigned this Jun 22, 2026

@arelra arelra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🎉

@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 23, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 23, 2026
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Jun 23, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 23, 2026
@Jakeii Jakeii merged commit baa2f3b into main Jun 23, 2026
28 checks passed
@Jakeii Jakeii deleted the jlk/fix-emotion-template-literal-2 branch June 23, 2026 12:00
@gu-prout

gu-prout Bot commented Jun 23, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @Jakeii 9 minutes and 18 seconds ago) Please check your changes!

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

Labels

fix Departmental tracking: fix Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants