Skip to content
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

fix(v2): resolve webpack loaders from siteDir/node_modules #3313

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

anshulrgoyal
Copy link
Contributor

Motivation

Fix url-loader not found if the docs folder is outside siteDir. Fixes #2724.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Tested on react-native site migration repo

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 20, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit aea0ede

https://deploy-preview-3313--docusaurus-2.netlify.app

@slorber
Copy link
Collaborator

slorber commented Aug 20, 2020

Thanks

Wonder if siteDir/node_modules should actually be the first in that array? Do you think there's a case where we'd like to look at /parent/node_modules in priority over /parent/siteDir/node_modules?

If a dep exist in the 2 node modules, in 2 different versions, I think we should consider first the one of the sitedir right?

@anshulrgoyal
Copy link
Contributor Author

"node_module" will just be like check-in all node_module, If not found fallback to siteDir/node_modules.

@slorber
Copy link
Collaborator

slorber commented Aug 20, 2020

Let's merge this, and see if it improves the URL loader problem.

Not 100% convinced the order is right, but we'll see if someone will come with an issue

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Aug 20, 2020
@slorber slorber merged commit ef5f6fb into facebook:master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support prepending of base url in markdown image paths
4 participants