-
Notifications
You must be signed in to change notification settings - Fork 32
[BPK-838] Add optimize-css-assets-webpack-plugin
#2
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
matthewdavidson
left a comment
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.
Needs a changelog entry too.
LGTM otherwise
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.
Whats the thinking here? i.e .why would we need to expose those options to userland config? We don't do this for autoprefixer for instance...
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.
Also if there is a good reason to do that, then it would need documentation.
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 figured we'd ship it silently to futureproof when someone inevitably finds something they want to tweak which is why I didn't include docs
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 see. I guess the whole premise of create-react-app (and thus backpack-react-scripts) is to hide the configuration away from consumers. If there is something that a consumer / team deems necessary to include then why wouldn't we wanna include that for everyone? Im tempted to remove it.
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.
Fair enough. I’ll remove it 👍
d736132 to
1ac221a
Compare
packages/react-scripts/CHANGELOG.md
Outdated
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.
Matt thoughts on this. My thinking is that this is a significant change in output result so it should be breaking even though no change is required by the user. Erring on the side of caution
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.
Is it going to break builds? Is it going to break visual layout of apps?
If the answer is no to both of them then I think it's a fix.
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.
Nope it shouldn't affect anything, but it's a more aggressive optimizer so it could introduce issues.
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.
We can do a smoke test on some internal projects to get confidence?
e1bf4ef to
9746fdb
Compare
|
@matthewdavidson Have a look again please |
matthewdavidson
left a comment
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've verified this on an internal project. ![]()
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.
unnecessary new line
For prod and SSR builds include `optimize-css-assets-webpack-plugin` to optimize duplication in CSS output.
9746fdb to
1180252
Compare
For prod and SSR builds include
optimize-css-assets-webpack-plugintooptimize duplication in CSS output.