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

refactor: use createRequire to load/resolve modules #5092

Merged
merged 2 commits into from Jan 23, 2020

Conversation

sodatea
Copy link
Member

@sodatea sodatea commented Jan 19, 2020

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)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

@sodatea
Copy link
Member Author

sodatea commented Jan 19, 2020

@arcanis Can this change eliminate the need to move Generator logic into project local dependencies as said in #4531?

@arcanis
Copy link
Contributor

arcanis commented Jan 19, 2020

@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)) 👍

@sodatea sodatea changed the title refactor: use createRequire to resolve modules refactor: use createRequire to load/resolve modules Jan 20, 2020
@pksunkara pksunkara merged commit 15679de into vuejs:dev Jan 23, 2020
@arcanis
Copy link
Contributor

arcanis commented Jan 23, 2020

By any chance, can master be released? I'll be releasing the very first stable build for Yarn 2 tomorrow morning 😊

@sodatea
Copy link
Member Author

sodatea commented Jan 24, 2020

That soon?
OK, I'll try to squeeze some time to test it and release a new version in hours. It's Chinese New Year's Eve today so I didn't expect a new release… But a patch is fine.

@arcanis
Copy link
Contributor

arcanis commented Jan 24, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants