-
Notifications
You must be signed in to change notification settings - Fork 238
fix(components): always force speedy mode for emotion to avoid performance issues in dev mode COMPASS-9828 #7305
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
Conversation
…mance issues in dev mode
Co-authored-by: Sergey Petushkov <[email protected]>
2110341 to
b5afa3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes performance issues in development mode by forcing emotion to always use "speedy" mode for style insertion. The change addresses sluggish UI behavior in compass-web sync by bypassing emotion's default development mode behavior that uses slower style tag insertion.
Key changes:
- Remove NODE_ENV override in webpack config that forced production mode
- Add a new module to force emotion speedy mode at startup
- Improve error handling in the sync script cleanup process
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/compass-web/webpack.config.js | Removes webpack plugin that forced NODE_ENV to production |
| packages/compass-components/src/index.ts | Adds import for emotion speedy mode configuration |
| packages/compass-components/src/force-emotion-speedy.ts | New module that forces emotion to use speedy mode for performance |
| packages/compass-web/scripts/sync-dist-to-mms.js | Adds error-proof cleanup utility for the sync script |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Assigned |
Co-authored-by: Copilot <[email protected]>
Checklist
Motivation and Context
Currently we are experiencing a sluggish UI when running compass-web sync, it appears to be emotion related and we can try customizing the build process to insert a call to enable "speedy" mode.
Open Questions
Dependents
None
Types of changes