Vue CLI에서 가져온 파일 설명 (앱과 App.vue의 차이점)
Aug 21 2020
Vue Cli 가져온 부분을 제대로 이해하지 못합니다. 누구든지 Vue vs Vue ( 'vue'에서 Vue 가져 오기)와 App Vs App.vue (App.vue에서 앱 가져 오기)의 차이점을 알려주세요.
'vue'에서 Vue 가져 오기 './App.vue'에서 앱 가져 오기
new Vue ({el : '#app', render : h => h (App)})
답변
ThibautMaurice Aug 21 2020 at 16:51
// Import vue in itself
import Vue from 'vue'
// Import the App component, you can see it as the root of your app that will contain all of your other components
import App from './App.vue'
// Create a new javascript instance of vue
new Vue({
render: h => h(App), // This new instance will render the app component
}).$mount('#app') // Actually mount the whole application targeting the #app id in the DOM