Skip to content

fix(vue3-bridge): correct vue-router peer dependency#3603

Merged
danpeen merged 3 commits intomodule-federation:mainfrom
thedamon:patch-1
Mar 19, 2025
Merged

fix(vue3-bridge): correct vue-router peer dependency#3603
danpeen merged 3 commits intomodule-federation:mainfrom
thedamon:patch-1

Conversation

@thedamon
Copy link
Contributor

@thedamon thedamon commented Mar 17, 2025

Update peerDependency for vue3-bridge to point to the version of Vue Router that is compatible with Vue 3.

Closes #3567

Description

Updated vue-router peerDependency from 3 to 4.
This allows installing the package with npm without having to pass in --legacy-peer-deps.

Related Issue

#3567

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

Update peerDependency for vue3-bridge to point to the version of Vue Router that is compatible with Vue 3.

Closes module-federation#3567
@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2025

⚠️ No Changeset found

Latest commit: fa347c3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Mar 17, 2025

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit fa347c3
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/67da3a221f0c6c0008bf9821
😎 Deploy Preview https://deploy-preview-3603--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ScriptedAlchemy
Copy link
Member

Should we support 3 || 4 to support both?

@thedamon
Copy link
Contributor Author

thedamon commented Mar 18, 2025 via email

@thedamon
Copy link
Contributor Author

Should we support 3 || 4 to support both?

To follow up on my last reply, looking at the sourcecode it's using useRoute which is specifically from vue-router v4 not v3, so I think it should be locked to 4

@danpeen
Copy link
Contributor

danpeen commented Mar 18, 2025

@thedamon Vue Router v4 and v3 are not compatible. They have some significant differences that make them incompatible with each other. How about we set like this:

"peerDependencies": {
  "vue": "^2.0.0 || ^3.0.0",
  "vue-router": "^3.0.0 || ^4.0.0"
}

@thedamon
Copy link
Contributor Author

@thedamon Vue Router v4 and v3 are not compatible. They have some significant differences that make them incompatible with each other. How about we set like this:

"peerDependencies": {
  "vue": "^2.0.0 || ^3.0.0",
  "vue-router": "^3.0.0 || ^4.0.0"
}

I think the code of this repo itself, as well as the naming, is such that it would only be compatible with vue 3 + vue-router 4. I think using it with vue-router 3 would break. I would respect the version of vue-router already present in the devDependencies, which is 4.

@danpeen
Copy link
Contributor

danpeen commented Mar 19, 2025

@thedamon Makes sense. I think only if we need to support vue2 could we make this compatible change.

@danpeen danpeen merged commit 055853f into module-federation:main Mar 19, 2025
14 checks passed
@yaseiva
Copy link

yaseiva commented Mar 19, 2025

I was hoping you would fix react-router at the same time.

warning " > @module-federation/bridge-react@0.10.0" has incorrect peer dependency "react-router-dom@^4 || ^5 || ^6"

We are on v7 now, you want me to create a issue for this?

@MaksSieve
Copy link

whe we will see a package with thi changes? this error blocks us from using module federation at all :(

@2heal1 2heal1 mentioned this pull request Mar 25, 2025
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.

[@module-federation/bridge-vue3] Conflicting vue-router peer dependency

5 participants

Comments