jiyuujin / vue3-boilerplate

Vue `3.x` starter template
1 stars 0 forks source link

Vue3.0 初期設定 #2

Open jiyuujin opened 4 years ago

jiyuujin commented 4 years ago

概要

Vue 2.x と比べがらっと変わる!

yarn add vue@next vue-router@next
yarn add @vue/test-utils@next vue-cli-plugin-vue-next -D

エントリーポイントの作成

import { createApp } from 'vue'
import App from './App'

// `vue-router` を使う場合
import router from './router'

const app = createApp(App)

app.use(router)

app.mount('#app')

vue-router 初期設定

import { createRouter, createWebHistory } from 'vue-router'

import HelloWorld from '../components/HelloWorld'

const routes = [
  {
    path: '/',
    name: 'HelloWorld',
    component: HelloWorld
  }
]

const router = createRouter({
  history: createWebHistory(),
  linkActiveClass: 'active',
  routes
})

export default router
jiyuujin commented 4 years ago

Announce is out

https://github.com/vuejs/rfcs/issues/183

jiyuujin commented 4 years ago

rc is out

https://github.com/vuejs/rfcs/issues/189

Experimental

jiyuujin commented 4 years ago

You can confirm in https://github.com/jiyuujin/vue3-boilerplate/pull/4 exclude unit test

jiyuujin commented 4 years ago

Wait for @storybook/vue@6.1