vue 초기 화 오류, 정의 되 지 않 은 property '$createElement' 를 읽 을 수 없습니다.

735 단어 Vue
import Vue from 'vue'
import App from './App'
import axios from 'axios'
import Router from 'vue-router'

// scss
import './style/reset.scss'

// conponents
import HomeView from './components/HomeView.vue'
import LoginView from './components/LoginView.vue'

Vue.prototype.$http = axios
Vue.config.productionTip = false
Vue.use(Router)

const routes = [
	{
		path: '/home',
		components: HomeView
	},
	{
		path: '/login',
		components: LoginView
	}
]

const router = new Router({
	routes
})

/* eslint-disable no-new */
const app = new Vue({
	router,
	render: h => h(App)
}).$mount('#app')

해결 방법: components 를 component 로 변경

좋은 웹페이지 즐겨찾기