-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
perf(v2): improve blog mdx-loader and postcss loader #4355
Conversation
[V1] Deploy preview success Built with commit 774df2d |
Size Change: -483 B (0%) Total Size: 532 kB
ℹ️ View Unchanged
|
Deploy preview for docusaurus-2 ready! Built with commit 774df2d |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4355--docusaurus-2.netlify.app/classic/ |
Maybe we should improve Babel somehow? For example add such a plugin? https://babeljs.io/docs/en/babel-plugin-transform-react-constant-elements |
LGTM thanks |
@lex111 yes there are a few babel plugins that could be useful to try. Most of them are in https://github.com/jamiebuilds/babel-react-optimize In the past I had problems due to the order of these plugins (jamiebuilds/babel-react-optimize#33 ). but normally that works nicely. I think some of the plugins are even enabled in CRA now |
@@ -93,7 +94,7 @@ | |||
"null-loader": "^4.0.0", | |||
"optimize-css-assets-webpack-plugin": "^5.0.4", | |||
"pnp-webpack-plugin": "^1.6.4", | |||
"postcss": "^8.2.6", | |||
"postcss": "^8.2.7", | |||
"postcss-loader": "^4.1.0", | |||
"postcss-preset-env": "^6.7.0", |
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.
Does this still need to be a dependency after the update?
Motivation
Resolves one TODO comment related with perf of linkify function and also removes postcss-preset-env, which we essentially don't need it, because we can use autoprefixer directly instead.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Preview
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)