From 95af63bd07cda1c2de7f9541b57860da47deb38e Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 8 Oct 2021 01:56:50 +0800 Subject: [PATCH] 3.0.0-beta.6 --- package.json | 2 +- .../src/router/index.js | 32 ++++++++--------- .../jsx-router-vuex/src/router/index.js | 32 ++++++++--------- .../jsx-router-with-tests/src/router/index.js | 32 ++++++++--------- playground/jsx-router/src/router/index.js | 32 ++++++++--------- .../src/router/index.js | 32 ++++++++--------- playground/router-vuex/src/router/index.js | 32 ++++++++--------- .../router-with-tests/src/router/index.js | 32 ++++++++--------- playground/router/src/router/index.js | 32 ++++++++--------- .../src/router/index.ts | 34 ++++++++----------- .../src/router/index.ts | 34 ++++++++----------- .../src/router/index.ts | 34 ++++++++----------- .../typescript-jsx-router/src/router/index.ts | 34 ++++++++----------- .../src/router/index.ts | 34 ++++++++----------- .../src/router/index.ts | 34 ++++++++----------- .../src/router/index.ts | 34 ++++++++----------- .../typescript-router/src/router/index.ts | 34 ++++++++----------- 17 files changed, 241 insertions(+), 289 deletions(-) diff --git a/package.json b/package.json index 763f5ae4..8e0a2dba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-vue", - "version": "3.0.0-beta.5", + "version": "3.0.0-beta.6", "description": "An easy way to start a Vue project", "type": "module", "bin": { diff --git a/playground/jsx-router-vuex-with-tests/src/router/index.js b/playground/jsx-router-vuex-with-tests/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/jsx-router-vuex-with-tests/src/router/index.js +++ b/playground/jsx-router-vuex-with-tests/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/jsx-router-vuex/src/router/index.js b/playground/jsx-router-vuex/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/jsx-router-vuex/src/router/index.js +++ b/playground/jsx-router-vuex/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/jsx-router-with-tests/src/router/index.js b/playground/jsx-router-with-tests/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/jsx-router-with-tests/src/router/index.js +++ b/playground/jsx-router-with-tests/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/jsx-router/src/router/index.js b/playground/jsx-router/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/jsx-router/src/router/index.js +++ b/playground/jsx-router/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/router-vuex-with-tests/src/router/index.js b/playground/router-vuex-with-tests/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/router-vuex-with-tests/src/router/index.js +++ b/playground/router-vuex-with-tests/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/router-vuex/src/router/index.js b/playground/router-vuex/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/router-vuex/src/router/index.js +++ b/playground/router-vuex/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/router-with-tests/src/router/index.js b/playground/router-with-tests/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/router-with-tests/src/router/index.js +++ b/playground/router-with-tests/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/router/src/router/index.js b/playground/router/src/router/index.js index 26bf8e7e..e0434fd0 100644 --- a/playground/router/src/router/index.js +++ b/playground/router/src/router/index.js @@ -1,25 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' -const routes = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-jsx-router-vuex-with-tests/src/router/index.ts b/playground/typescript-jsx-router-vuex-with-tests/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-jsx-router-vuex-with-tests/src/router/index.ts +++ b/playground/typescript-jsx-router-vuex-with-tests/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-jsx-router-vuex/src/router/index.ts b/playground/typescript-jsx-router-vuex/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-jsx-router-vuex/src/router/index.ts +++ b/playground/typescript-jsx-router-vuex/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-jsx-router-with-tests/src/router/index.ts b/playground/typescript-jsx-router-with-tests/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-jsx-router-with-tests/src/router/index.ts +++ b/playground/typescript-jsx-router-with-tests/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-jsx-router/src/router/index.ts b/playground/typescript-jsx-router/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-jsx-router/src/router/index.ts +++ b/playground/typescript-jsx-router/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-router-vuex-with-tests/src/router/index.ts b/playground/typescript-router-vuex-with-tests/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-router-vuex-with-tests/src/router/index.ts +++ b/playground/typescript-router-vuex-with-tests/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-router-vuex/src/router/index.ts b/playground/typescript-router-vuex/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-router-vuex/src/router/index.ts +++ b/playground/typescript-router-vuex/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-router-with-tests/src/router/index.ts b/playground/typescript-router-with-tests/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-router-with-tests/src/router/index.ts +++ b/playground/typescript-router-with-tests/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router diff --git a/playground/typescript-router/src/router/index.ts b/playground/typescript-router/src/router/index.ts index 06036285..e0434fd0 100644 --- a/playground/typescript-router/src/router/index.ts +++ b/playground/typescript-router/src/router/index.ts @@ -1,27 +1,23 @@ import { createRouter, createWebHistory } from 'vue-router' -import type { RouteRecordRaw } from 'vue-router' - import Home from '../views/Home.vue' -const routes: Array = [ - { - path: '/', - name: 'Home', - component: Home - }, - { - path: '/about', - name: 'About', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/About.vue') - } -] - const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes + routes: [ + { + path: '/', + name: 'Home', + component: Home + }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/About.vue') + } + ] }) export default router -- 2.39.5