V
V
Vampre2021-03-31 04:27:04
Vue.js
Vampre, 2021-03-31 04:27:04

How to collect only one page from vue.config.pages?

I have something like this config:

const path = require('path');

module.exports = {
  "transpileDependencies": [
    "vuetify"
  ],
  filenameHashing: false,
  pages: {
    admin: {
      entry: 'src/admin/main.js',
      template: 'public/admin.html',
      filename: 'admin.html',
      title: 'Admin',
      chunks: ['chunk-vendors', 'chunk-common', 'admin'],
    },
    employee: {
      entry: 'src/employee/main.js',
      template: 'public/employee.html',
      filename: 'employee.html',
      title: 'Employee',
      chunks: ['chunk-vendors', 'chunk-common', 'employee'],
    }
  }
}


I want to collect only the employee page, tried
vue-cli-service build --dest dist/employee src/employee/main.js
- that is, manually specify src, in the end it still collects admin.js:

dist\employee\js\chunk-vendors.js      1086.32 KiB                       335.12 KiB
  dist\employee\js\chunk-common.js       118.25 KiB                        16.98 KiB
  dist\employee\js\admin.js              3.18 KiB                          1.51 KiB
  dist\employee\js\employee.js            3.02 KiB                          1.48 KiB
  dist\employee\css\chunk-vendors.css    405.48 KiB                        49.68 KiB

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question