Repository navigation
fix(v2): Consistently use require.resolve in official plugins to resolve modules - #2797
Merged
yangshun merged 2 commits intoMay 23, 2020
Merged
Conversation
Contributor
|
Deploy preview for docusaurus-2 ready! Built with commit c9ba90d |
SamChou19815
marked this pull request as ready for review
May 22, 2020 22:54
yangshun
approved these changes
May 23, 2020
Contributor
Author
I think we should. I'm hoping that there is some docs on yarn website on how to write pnp compatible packages, but I couldn't find them, so I guess we have to write our own. |
mrizwanashiq
pushed a commit
to mrizwanashiq/docusaurus
that referenced
this pull request
Jun 25, 2026
…lve modules (meta#2797) * fix(v2): Use require.resolve to resolve loaders in official plugins * Use require.resolve to resolve client modules
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
Continuing the effort in #2788, #2794, using
require.resolveto resolve absolute paths for loaders and client modules to ensure it can work under yarn pnp.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
The website can build, and preview can load.
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.)