feat(v2): Webpack 5, PostCSS 8#4089
Merged
slorber merged 157 commits intofacebook:masterfrom Apr 30, 2021
RDIL:webpack-5
Merged
feat(v2): Webpack 5, PostCSS 8#4089slorber merged 157 commits intofacebook:masterfrom RDIL:webpack-5
slorber merged 157 commits intofacebook:masterfrom
RDIL:webpack-5
Conversation
|
[V2] Built with commit 867d034 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
lex111
reviewed
Jan 22, 2021
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
RDIL
commented
Feb 5, 2021
RDIL
commented
Feb 9, 2021
Signed-off-by: Reece Dunham <me@rdil.rocks>
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4089--docusaurus-2.netlify.app/ |
This was referenced Apr 23, 2021
Collaborator
|
So, I tested this on a lot of sites (cf list at the top) and it seems to work great in most cases, just noted a few minor changes to do. We'll likely do one last Webpack 4 bugfix release soon and then merge this PR next week. |
Contributor
|
Glad to receive your PR! @slorber And if it's ready to merge, just let us know :) |
# Conflicts: # packages/docusaurus-init/templates/bootstrap/package.json
slorber
added a commit
that referenced
this pull request
Apr 30, 2021
> Conflict: Multiple assets emit different content to the same filename assets/ideal-img/datagit.100.png see #4089 (comment)
Collaborator
|
going to merge/release this, and add another PR for the asset modules, as there are some details I'm not yet able to solve |
Contributor
Author
|
🎉 🎉 🎉 |
Collaborator
|
Thanks for your work on this @RDIL ! happy to get this finally merged |
slorber
added a commit
that referenced
this pull request
Apr 30, 2021
> Conflict: Multiple assets emit different content to the same filename assets/ideal-img/datagit.100.png see #4089 (comment)
facebook-github-bot
pushed a commit
to facebook/hermes
that referenced
this pull request
May 5, 2021
Summary: Use an unreleased version of Docusaurus to test the webpack5 support works for this site, detect potential problems, and perf improvements. See also facebook/docusaurus#4089 Pull Request resolved: #500 Reviewed By: dulinriley Differential Revision: D28129952 Pulled By: Huxpro fbshipit-source-id: 07942b60d5200ea6dc3a9de86844da349f700a31
facebook-github-bot
pushed a commit
to facebook/relay
that referenced
this pull request
May 21, 2021
Summary: Use an unreleased version of Docusaurus to test the webpack5 support works for this site, detect potential problems, and perf improvements. See also facebook/docusaurus#4089 Perf improvements - First build (local): 300s - Second build (local): 90s To get the benefits, it requires caching `node_modules/.cache`. It is not possible in GH actions, so I suggest migrating the site to Netlify and use the appropriate toml config (example: https://github.com/react-navigation/react-navigation.github.io/pull/974/files) --- Unrelated suggestion: Relay has a lot of versions and long build/start times Assuming nobody ever edit Relay docs of 2 years ago, you can improve the DX by limiting the number of versions display in dev with this docs plugin config: ``` onlyIncludeVersions: (isDev || isDeployPreview) ? ['current', ...versions.slice(0, 2)] : undefined, ``` For faster prod build, you can also move older docs to standalone deployments and link to them (see Jest for versions < 25 => https://jestjs.io/) Pull Request resolved: #3469 Reviewed By: rbalicki2 Differential Revision: D28127629 Pulled By: jstejada fbshipit-source-id: c78309aa1c7f14f22ecc33166ad5dce7d2e51f94
5 tasks
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.
PR by @RDIL & @slorber
Issue: #4027
Released in 2.0.0-alpha.75
Breaking changes
As it's a major Webpack version upgrade, it is a breaking change and can require adapt things on your sites such as the
configureWebpackof your custom plugins.However, sites that do not have custom plugins and mostly use a basic config should be able to upgrade seamlessly.
Please report any issues otherwise.
Known issues:
Using persistent caching
Make your CI cache the
node_modules/.cachefolder across 2 CI builds, and the 2nd build becomes much faster.If you get some deprecation warnings, please report them here with the stacktrace, by running
NODE_OPTIONS='--trace-warnings' yarn buildTested on a lot of sites with great success: