Vue CLIでインポートされたファイルの説明(AppとApp.vueの違い)
Aug 21 2020
VueCliインポートしたパーツが正しくわかりません。VueとVue(「vue」からVueをインポート)とApp Vs App.vue(App.vueからアプリをインポート)の違いを教えてください。
import Vue from'vue 'import App from' ./ 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