-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
refactor: use createRequire to load/resolve modules #5092
refactor: use createRequire to load/resolve modules #5092
Conversation
@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)) 👍 |
By any chance, can |
That soon? |
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! |
* refactor: use createRequire to resolve modules * fix: use file path as createRequire argument; fix loadModule.
See import-js/eslint-plugin-import#1591 and import-js/eslint-plugin-import#1602
As far as I understand,
createRequire
is 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: