router icon indicating copy to clipboard operation
router copied to clipboard

wip: vapor mode

Open zhiyuanzmj opened this issue 6 months ago • 2 comments

Description

This PR provide two vapor components: VaporRouterView and VaporRouterLink. I'm not sure whether we should provide a vue-router/vapor for users to make migration easier.

import { RouterView } from 'vue-router/vapor'

export default () => <RouterView />

This PR depends on those pull requests: https://github.com/vuejs/core/pull/13424 https://github.com/vuejs/core/pull/13360

Playground

https://repl.zmjs.dev/vuejs/vue-router

TODO

  • [ ] Tests
  • [ ] Playground

zhiyuanzmj avatar Jun 01 '25 13:06 zhiyuanzmj

Deploy Preview for vue-router canceled.

Name Link
Latest commit 02a3c5b98d15b6343b866249f4e50affeabfd4a8
Latest deploy log https://app.netlify.com/projects/vue-router/deploys/6870ba9b6c9d6000087019da

netlify[bot] avatar Jun 01 '25 13:06 netlify[bot]

Open in StackBlitz

npm i https://pkg.pr.new/vue-router@2509

commit: 02a3c5b

pkg-pr-new[bot] avatar Jun 01 '25 13:06 pkg-pr-new[bot]

Note for myself for refactoring and simplification: Playground

posva avatar Jul 11 '25 14:07 posva

Is this already compatible with ā€œ3.6.0-alpha.1ā€? Or is there still work required? I’d be happy to help if I can.

Reinhard-Berger avatar Jul 14 '25 21:07 Reinhard-Berger

Is this already compatible with ā€œ3.6.0-alpha.1ā€? Or is there still work required? I’d be happy to help if I can.

You can try it in [email protected]

zhiyuanzmj avatar Jul 28 '25 21:07 zhiyuanzmj

The automatic global registration of the virtual DOM RouterView and RouterLink components in the install hook should probably be removed so that they can be tree-shaken when an app is only using the Vapor ones.

absidue avatar Aug 04 '25 11:08 absidue

FYI this is planned after #2415 which will also allow to register a custom RouterView and RouterLink

posva avatar Aug 04 '25 12:08 posva