Merged
Conversation
Contributor
Author
|
This one is blocking a release for us @NoahDragon, any chance it could get merged soon? |
JLHwung
requested changes
Feb 23, 2018
| function loadModule(path, args) { | ||
| return Promise.try(function() { | ||
| var modulePath = pathFn.join(path, 'node_modules', 'hexo'); | ||
| var modulePath = resolve.sync('hexo', { basedir: path }); |
Contributor
There was a problem hiding this comment.
It is sufficient to use builtin require.resolve since resolve implements require.resolve for browser-side support and hexo does not, at least officially, support browser environment.
Contributor
Author
There was a problem hiding this comment.
Fair enough! At the time I discovered the resolve package, node didn't export the right stuff. I've patched it!
This was referenced Feb 23, 2018
|
Hey @JLHwung could you check out our changes and let us know if we can get this merged soon? Thanks so much! |
Contributor
This reverts commit 618286b.
Contributor
Author
|
That issue should be resolved @JLHwung! |
|
Thanks @JLHwung! Would there be any chance you can look at this similar one? hexojs/hexo#3045 |
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.
If docs are included as a part of the primary application via yarn workspaces (See https://yarnpkg.com/lang/en/docs/workspaces/) the module resolution for the main
hexopackage fails, because it is nested above.This PR addresses this issue by replacing the current custom module resolution with the resolve which implements the resolve algorithm.
This, in my opinion, fits the design requirements as well as extending it to allow for the yarn workspace issue without much hassle.