mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-14 13:11:10 -05:00
feat!: make router a separate plugin (#4196)
* refactor: move router to its own plugin * refactor: rename routerHistoryMode option to historyMode * test: add @vue/cli-plugin-router tests * feat: change src/router.js for most common use cases * fix: fix cli-ui tests * docs: Remove router root option from docs * fix: add support for legacy router option
This commit is contained in:
committed by
Haoqun Jiang
parent
9eadfe1eba
commit
246ae678cb
@@ -1274,7 +1274,7 @@ const ROUTER = 'vue-router-add'
|
||||
|
||||
api.onViewOpen(({ view }) => {
|
||||
if (view.id === 'vue-project-plugins') {
|
||||
if (!api.hasPlugin('vue-router')) {
|
||||
if (!api.hasPlugin('router')) {
|
||||
api.addSuggestion({
|
||||
id: ROUTER,
|
||||
type: 'action',
|
||||
@@ -1282,7 +1282,7 @@ api.onViewOpen(({ view }) => {
|
||||
message: 'org.vue.cli-service.suggestions.vue-router-add.message',
|
||||
link: 'https://router.vuejs.org/',
|
||||
async handler () {
|
||||
await install(api, 'vue-router')
|
||||
await install(api, 'router')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user