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.
Improve website performance.
Why?
Let's take this page for example https://webpack.js.org/api/node/.
Open devtools and click the link in the screenshot below:
Here's the network panel:
Even with service worker, we still have a lot of requests.
Now let's open the preview of this pull request https://webpack-js-org-git-fork-chenxsan-feature-use-react-route-5aabb7.webpack-docs.vercel.app/api/node/, and click the same link:
That's impressive isn't it?
What's going on
This website is a Single Page React Application with precompiled HTML, but links in body are rendered as
<a>
elements, which would cause browser to load a whole new html page. When we render them asLink
fromreact-router
, it would dynamic load the needed part instead of loading a new html page, and it's possible withMDX
. Guess this is a good reason to migrate from.md
to.mdx
because we have so many internal links.