Vue new project, directory file explanation

1.
write picture description here
2.
1. The build folder is to save some initial configurations of webpack. The config folder holds some configuration for project initialization.
2. node_modules is the module that the project loaded by npm depends on.
3. The src directory is the directory we want to develop. Open it like this:
write picture description here

Among them assets: used to place pictures
components: used to place component files
app.vue: is the project entry file, the code is as follows:
write picture description here
App.vue is equivalent to a component main.js
is the core file of the project. The code is as follows:
write picture description here
import Vue from 'vue'
import App from './App'
import router from './router'
These three sentences mean that vue is first introduced, and then ./App is the App.vue file. The last sentence is to introduce a routing configuration.
Then instantiate new Vue .el: '#app' which means who put all the components in the element with id app. components indicates the imported file, here is the file app.vue, the content of this file will be written into #app with such a tag.
Looking at the App.vue file, we can see that there are three parts, namely.
When webpack compiles, it can extract these three parts from the .vue file to synthesize a separate cinderella file.
4. The static folder is used to place the static resource directory
5. index.html is the entry file of the home page
6. package.json is the project configuration file

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326079139&siteId=291194637