-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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: CSS import in CT Support file is not working #24117
Conversation
Thanks for taking the time to open a PR!
|
…nto issue-23025 updating local branch
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
merging with develop
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.
I left a minor comment. Looks good to me! Nice work on this 🎉 definitely want to get some input from others about this solution just to make sure we're doing the right thing here
…nto issue-23025 merging with remote branch
…nto issue-23025 merging with remote branch
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.
Just a few comments. I realized that Cypress + sideEffects is not ideal. Makes me almost want to disable them entirely (maybe with this). The reason is that it doesn't just affect css files but any code that's imported like import 'xxx'
. The import './commands.js'
would be tree-shaken away as well, so it's not just css. Still, I think this is an improvement.
@ZachJW34 I didn't see that |
…nto issue-23025 merging with remote branch
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.
Nice and simple
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
Webpack >=4 adds a new feature: giving the user the ability to add sideEffects to their package.json files. If a user adds the CT Support file as a part of their side effect, all global application styles that may have been imported in the support file (e.g. import ./example.css) are not applied.
Additional details
Steps to test
How has the user experience changed?
Before:

After:

PR Tasks
cypress-documentation
?type definitions
?