In general, the SPA single-page application developed by VUE is generally developed in the development of a low-code platform of the company, which is known as vUE multi-page application.

Note the multi-entry configuration

Go to the vue.config.js file and, in the module.exports domain, find Entry and configure it there to add multiple entries:

module.exports = {
  publicPath: '/'.devServer: {
    proxy: {
      '/dev': {
        target: ' '.changeOrigin: true.pathRewrite: {
          '^/dev': ' '}}}},configureWebpack: config= > {
    config.devtool = 'source-map'
  },
  css: {
    // CSS default configuration item
    loaderOptions: {
      sass: {
        // If the sass-loader is V8+, do away with the data configuration item and change it to prependData
        // data: `@import "@/styles/setting-variable.scss"; `
        prependData: '@import "@/styles/index.scss"; '}}},pages: {
    workbench: {
        entry: 'src/modules/workbench/main.js'.template: 'public/index.html'.filename: 'multi-page/workbench.html'.title: 'workbench'.chunks: ['chunk-vendors'.'chunk-common'.'workbench']},'home-page': {
      entry: 'src/modules/home-page/main.js'.template: 'public/index.html'.filename: 'multi-page/home/home-page.html'.title: 'home-page'.chunks: ['chunk-vendors'.'chunk-common'.'home-page']},'call-log': {
      entry: 'src/modules/call-log/main.js'.template: 'public/index.html'.filename: 'multi-page/home/call-log.html'.title: 'call-log'.chunks: ['chunk-vendors'.'chunk-common'.'call-log']},'seats-manage': {
      entry: 'src/modules/seats-manage/main.js'.template: 'public/index.html'.filename: 'multi-page/home/seats-manage.html'.title: 'seats-manage'.chunks: ['chunk-vendors'.'chunk-common'.'seats-manage']},settings: {
      entry: 'src/modules/settings/main.js'.template: 'public/index.html'.filename: 'multi-page/home/settings.html'.title: 'settings'.chunks: ['chunk-vendors'.'chunk-common'.'settings']}}},Copy the code

There are 5 entries configured for 5 modules

After the entry configuration, it can be developed according to the usual development habits, and the single module is still developed according to the way of single page