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

Use optional peerDependency to ensure latest @intlify/vue-i18n-loader is used with Vue I18n v9 #50

Closed
3 tasks done
WIStudent opened this issue Oct 4, 2021 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed Package: vue-i18n-loader Status: Proposal Request for comments

Comments

@WIStudent
Copy link

Clear and concise description of the problem

According to the README, the latest @intlify/vue-i18n-loader requires Vue I18n v9:

This package of @intlify/bundle-tools is for Vue I18n v9 or later!
The version for Vue I18n v8.x is now in @intlify/vue-i18n-loader v1.x!

This should be enforced in the package.json.

Suggested solution

Use optional peerDependency to require v9 if vue-i18n is installed.

{
  "peerDependencies": {
    "vue-i18n": "^9.0.0"
  },
  "peerDependenciesMeta": {
    "vue-i18n": {
      "optional": true
    }
  }
}

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the README
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@WIStudent WIStudent added the Status: Proposal Request for comments label Oct 4, 2021
@kazupon kazupon added good first issue Good for newcomers help wanted Extra attention is needed Package: vue-i18n-loader labels Oct 4, 2021
@pmrotule
Copy link

I ran into the same issue: I had to dig deep to find that the latest version of @intlify/vue-i18n-loader was for Vue 3. I would personally also add Vue 3 as peer dependency to make it extra clear. Moreover, I wouldn't add "optional": true since it is not optional: you have to use vue-i18n v9 or later otherwise it won't work.

@kazupon
Copy link
Member

kazupon commented Nov 22, 2021

I've fixed and released out!
Please check it!
Thanks!

@kazupon kazupon closed this as completed Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed Package: vue-i18n-loader Status: Proposal Request for comments
Projects
None yet
Development

No branches or pull requests

3 participants