Skip to content

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Jan 5, 2018

emotion doesn't render styles into DOM when NODE_ENV == production, so add logic to do this when we are in a percy environment

  • - deploy and test on staging

@billyvg billyvg requested a review from a team January 5, 2018 02:34
@MaxBittker
Copy link
Contributor

MaxBittker commented Jan 5, 2018

this is definitely a runtime check right? because travis builds the bundles. so prepack or whatever could accidently trigger this (very theoretical)
it would be nice to have a foolproof way to be sure this doesn't end up in prod silently ;/
Any thoughts?

@billyvg
Copy link
Member Author

billyvg commented Jan 5, 2018

Travis doesn't build our bundles when we deploy. This is really a build-time check because process.env gets injected by webpack.

Unrelated but we should wrap the code in a condition block so it gets minified away in prod.

@billyvg billyvg changed the title build(percy): Fix percy rendering w/ emotion [WIP] build(percy): Fix percy rendering w/ emotion Jan 5, 2018
@billyvg billyvg merged commit d95b2c4 into master Jan 5, 2018
@billyvg billyvg deleted the build/percy/fix-emotion-rendering branch January 5, 2018 22:58
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2020
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.

4 participants