I just learned VUE Xiao Bai, nodejs webpack understands, but it means VUE can’t understand many places. Most important of all:
- In the official Hello World example, what is new Vue pointing to App.vue in main.js? How does app.vue file correspond to index.html? Is the index.html written inside, Vue doomedSingle page, HTML can only be called index.html?
- What if I wrote a Login.html, a MainFram.html, and N multiple modules.html?
Ask for confusion!!!
This has nothing to do with Vue. You need to configure multiple entries in webpack.
nodeThe loading mechanism of the module,
nodeThere is a way to find a file by yourself, and it will start from
package.jsonLookup in the configuration file
mainConfiguration file, if there is, execution;
Otherwise look up the current path
index.nodeDocument, if there is, execution;
Otherwise the execution failed and returned
main.jsThe default route of the file is directed
app.vueThe correspondence with index.html is configured in the config.js file. The official example uses a single page vue.js scaffolding, you can modify the webpack configuration, configure multiple entries, build a multi page scaffolding, and have a modified GitHub on the GitHub.After cloned, you can use it directly. You can try it.
vueThere are many page development configurations that need online search. See also GitHub.
@What if Xiaofeng wants main.js to point to other HTML?