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: resolve dependency issues #40

Merged
merged 2 commits into from
Apr 21, 2022
Merged

Conversation

merceyz
Copy link
Contributor

@merceyz merceyz commented Mar 29, 2022

What's the problem this PR addresses?

  • vue-template-compiler isn't declared as a dependency nor a peer dependency.
  • Babel plugins aren't resolved before they are passed to Babel which makes it resolve them from the current working directory. This doesn't work in strict dependency environments and is prone to breaking if hoisting isn't in its favour.

https://yarnpkg.com/advanced/rulebook/#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies

How did you fix it?

  • Declare vue-template-compiler as a peer dependency.
  • require.resolve the plugins before passing them to Babel.

@arcanis
Copy link

arcanis commented Apr 19, 2022

Gently ping @JuniorTour? If you had a chance to review and release this PR it'd be much appreciated, as it's causing our Vue E2E tests to crash 😃

@JuniorTour JuniorTour merged commit c6c7b16 into JuniorTour:main Apr 21, 2022
@JuniorTour
Copy link
Owner

We just publish v1.2.0 contains this Pull Request.

Try it by:

npm install vue-template-babel-compiler@latest
// or 
yarn add vue-template-babel-compiler@latest

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

Successfully merging this pull request may close these issues.

None yet

3 participants