How does VueCli3.0 build multiple pages?

only Vue has been used to develop a single page, which is realized by multi-routing. Want to know how VueCli3.0 implements multiple pages? Will the middle reference be packaged by webpack

Apr.08,2021

add vue.config.js to the root directory and write
module.exports = {

pages: {

    index: {
        // entry for the page
        entry: 'src/login/login.ts',
        // the source template
        // title: "Login page",
        template: 'src/login/login.html',
        // output as dist/index.html
        filename: 'index.html',
    },
    main: {
        entry: 'src/main.ts',
        // title: "main page",
        template: 'src/index.html',
        filename: 'main.html',
        chunks: ['app']
    }
}

}

modify the url, and the previous 2 by yourself. In version 9, multi-entry and multi-html pages are similar


just add a packaging entry in webpack. The packaging of webpack is packaged according to the reference relationship of the file. Once referenced, it will be packaged. You can write another entry and package configuration, and other configurations can be shared. look here


https://cli.vuejs.org/zh/conf.

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-1e4542e-44b17.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-1e4542e-44b17.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?