Skip to content

Commit c02aba6

Browse files
committed
Remove handling of router/vuex
1 parent aa00f27 commit c02aba6

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

src/render.js

+4-15
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,15 @@ function render(
1919
const baseElement = customBaseElement || customContainer || document.body
2020
const container = customContainer || baseElement.appendChild(div)
2121

22-
const plugins = mountOptions.global?.plugins || []
23-
24-
if (store) {
25-
const {createStore} = require('vuex')
26-
plugins.push(createStore(store))
27-
}
28-
29-
if (routes) {
30-
const requiredRouter = require('vue-router')
31-
const {createRouter, createWebHistory} =
32-
requiredRouter.default || requiredRouter
33-
34-
const routerPlugin = createRouter({history: createWebHistory(), routes})
35-
plugins.push(routerPlugin)
22+
if (store || routes) {
23+
console.warn(`Providing 'store' or 'routes' options is now deprecated.
24+
You need to create a router/vuex plugin and provide it through 'global.plugins'.
25+
See here for more information:`)
3626
}
3727

3828
const wrapper = mount(Component, {
3929
...mountOptions,
4030
attachTo: container,
41-
global: {...mountOptions.global, plugins},
4231
})
4332

4433
// this removes the additional "data-v-app" div node from VTU:

0 commit comments

Comments
 (0)