The new version of vue scaffolding webpack has been wrapped to look bad, need vue.config.js instead of configuration

let path = require('path')
function resolve (dir) {return path.join(__dirname, dir)
}
module.exports = {
    publicPath:'/wuhan'.// The base URL when deploying the application package. The usage is consistent with the output.publicpath of webpack itself
    outputDir:'dist3'.// Package path address,Default: 'dist', instead of output.path
    assetsDir:'assets1'.// Place the generated static resources (js, CSS, img, fonts) in the directory (relative to outputDir)
    indexPath:'test.html' ,// Static template file output address
    filenameHashing:true.// Whether the generated static file needs to have hash
  // // multi-page development needs
  // pages:{
  // index: {
  Entry to // // page
  // entry: 'src/index/main.js',
  // // Template Source
  // template: 'public/index.html',
  // // output in dist/index.html
  // filename: 'index.html',
  // // When using the title option,
  / / / / title of the template tag needs to be < title > < % = htmlWebpackPlugin. Options. The title % > < / title >
  // title: 'Index Page',
  // // contains blocks on this page that are contained by default
  // // general chunk and Vendor Chunk extracted.
  // chunks: ['chunk-vendors', 'chunk-common', 'index']
  / /},
  // // When using the entry only string format,
  The // // template will be derived to 'public/subpage.html'
  // // and if you can't find it, go back to 'public/index.html'.
  // // Output file name is derived to 'subpage.html'.
  // subpage: 'src/subpage/main.js'
  // },
  // runtimeCompiler:false, // Setting it to true will allow you to use template options in Vue components, but will impose an additional load of about 10 KB on your application.
  // productionSourceMap:false,
  // // configureWebpack: {
  // // plugins: [
  // // new MyAwesomeWebpackPlugin()
  / / / /]
  / / / /}
  chainWebpack: config= >{ config.resolve.alias.set(The '@', resolve('src'))},css: {extract:true./ / CSS
        sourceMap: true.// source map
    },
    devServer: {
      host:'0.0.0.0'.port:'8090'.https:true./ / visit: http://localhost:8090/api/info
      / / agent to http://localhost:8081/api/info
      / / the real interface address: http://localhost:8081/new/api/info
        proxy: {
            '^/api': {
              target: 'http://localhost:8081'.ws: true.changeOrigin: true.pathRewrite: {'^/api' : '/new/api'}
              // pathRewrite: {'^/old/api' : '/new/api'}
            },
            '^/foo': {
              target: 'http://localhost:8081'}}},parallel:4.// Whether to compress with multiple threads
  // // pWA :// Offline cache configuration, passing options to the PWA plug-in.
lintOnSave:false // EsLint validation is not required
  }

// Reference website:
// https://cli.vuejs.org/config/
Copy the code