How to load other pages on demand in a single-page Web application based on vue?

currently learning vue , just learned to use vue-cli to start development, but I found that scaffolding pages written with reference to vue-cli (that is, .vue file under src/components/ ) will all be packaged in a js file, so if there are many pages, won"t it be slow to enter for the first time?

I want to learn further. How can I separate these pages? Preferably one js per page

ps. The scaffolding I built does not contain a compiler. Is it necessary to include it?

May.11,2021

1. Routes can be used to load on demand.

{
    path: '/applay/toDoList',
    name: 'toDoList',
    meta: { requireAuth: true ,title: '',topMenueSb: true},
    component: () => import('../page/applay/toDoList')
}

2. In this way, for example, the home page will only load the code of the home page index.vue. Relatively shorten the home page loading time.
3. You said everything. This is a single-page application, since it is a single-page application, how to introduce a js to a page? From a personal point of view, since we have used this single-page model, we should try our best to fit this model. Optimize the problems you encounter in this mode.
4. If your goal is to use vue , but you don't want to use webpack packaging mode. vue is progressive, and you can introduce vue.js directly into html .
can then be written like a traditional jq project.


require.ensure can also be

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40e54-2c553.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40e54-2c553.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?