fix(core): bundler should not minimize static assets#10658
Merged
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Size Change: +225 B (0%) Total Size: 11.2 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: +215 B (0%) Total Size: 11.7 MB ℹ️ View Unchanged
|
evenstensberg
left a comment
There was a problem hiding this comment.
LMK if you need any reviews from the webpack team
Collaborator
Author
|
Thanks for the proposal @evenstensberg This one is already merged but I can ping you on other Webpack-related things? I'm also on the Rspack discord and getting some support here, since Webpack/Rspack have somehow the same API/behavior, but another pair of eyes might be useful. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
We are using Webpack copy-webpack-plugin to expose static assets from the
website/staticdir.These files are supposed to be exposed as-is, not being modified.
Unfortunately, we had a regression in Docusaurus v3.4 and the css/js minimizes started to be applied to these files as well. This is because I moved the copy plugin from webpack server config (minimizers disabled) to the client config (minimizers enabled):
17f3e02
(there are good reasons to do so, in particular now that the server is built into a
__serversubfolder)Test Plan
CI + added a dogfood test to prevent regressions (site failed to build before I apply the fix)
Test links
https://deploy-preview-10658--docusaurus-2.netlify.app/
Related issues/PRs
fix #10460
fix #10334