refactor: use createRequire to load/resolve modules#5092
Merged
pksunkara merged 2 commits intoJan 23, 2020
Conversation
Member
Author
arcanis
reviewed
Jan 19, 2020
Contributor
|
@sodatea I improved Yarn in yarnpkg/berry#630 to support the use case of Vue-CLI (and CRA), so the problem we described in #4531 should be fixed! That said the changes in this PR sound for the best regardless because of the post I shared you on Twitter (yarnpkg/berry#693 (comment)) 👍 |
pksunkara
approved these changes
Jan 23, 2020
Contributor
|
By any chance, can |
Member
Author
|
That soon? |
Contributor
|
Oh I'm sorry, I should have told you about the release earlier - please disregard, it's not that urgent (people will be able to add your Vue plugin anyway). Happy new year! |
mactanxin
pushed a commit
to mactanxin/vue-cli
that referenced
this pull request
Feb 11, 2020
* refactor: use createRequire to resolve modules * fix: use file path as createRequire argument; fix loadModule.
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.
See import-js/eslint-plugin-import#1591 and import-js/eslint-plugin-import#1602
As far as I understand,
createRequireis the only semantically correct way to resolve modules from a different context.What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information: