Explication du fichier importé dans Vue CLI (Différence entre App et App.vue)
Aug 21 2020
Vue Cli Je ne comprends pas correctement la partie importée. Quelqu'un peut-il me dire la différence entre Vue vs Vue (importer Vue depuis 'vue') ainsi qu'App Vs App.vue (importer App depuis App.vue)
importer Vue depuis 'vue' importer l'application depuis './App.vue'
nouvelle Vue ({el: '#app', render: h => h (App)})
Réponses
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