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): don't add mocked-styled classnames outside test env #1252

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

leiit
Copy link
Contributor

@leiit leiit commented May 19, 2023

Motivation

Fixes #1251

Summary

Adds a process.env.NODE_ENV check to styled when adding the mocked-styled classes, similar to how css is already doing.

Test plan

Can be seen by checking the website build:

Before (NODE_ENV=development)

Screenshot 2023-05-19 at 14 15 30

After (NODE_ENV=development)

Screenshot 2023-05-19 at 14 14 55

@changeset-bot
Copy link

changeset-bot bot commented May 19, 2023

🦋 Changeset detected

Latest commit: 6830fd6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@linaria/react Patch
@linaria/atomic Patch
linaria Patch
@linaria/testkit Patch
linaria-website Patch
esbuild-example Patch
rollup-example Patch
vite-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Anber Anber merged commit 1085992 into callstack:master Jul 3, 2023
@Anber
Copy link
Collaborator

Anber commented Jul 3, 2023

Thank you, @ucraft-ash!

@leiit leiit deleted the fix-styled-classnames branch July 4, 2023 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@linaria/react always generates a mocked-styled className
4 participants