const webpack = require('webpack') module.exports = { // publicPath: '/mi', outputDir: 'dist',// 运行时生成的生产环境构建文件的目录(默认''dist'',构建之前会被清除) assetsDir: 'static',//放置生成的静态资源(s、css、img、fonts)的(相对于 outputDir 的)目录(默认'') // 过滤掉打包会报错的插件依赖 transpileDependencies: ['vue-echarts', 'resize-detector', 'resize-detector', 'vue-quill-editor', 'quill-image-drop-module'], devServer: { port: 8080, proxy: { // 配置跨域 '/api': { target: 'http://127.0.0.1:7060', // 服务器 changeOrigin: true, }, // 请求静态图片配置项 '/api/home/pic': { target: 'http://127.0.0.1:7061', // 图片请求的nginx网址 changeOrigin: true } } }, chainWebpack: config => { config.plugin('html').tap(args => { args[0].title = '长安汽车' return args }) }, configureWebpack: { // provide the app's title in webpack's name field, so that // it can be accessed in index.html to inject the correct title. // externals: { // 'AMap': 'AMap' // 高德地图配置 // }, // name: name, // devtool: 'source-map', // resolve: { // alias: { // '@': resolve('src') // } // }, plugins: [ new webpack.ProvidePlugin({ 'window.Quill': 'quill/dist/quill.js', 'Quill': 'quill/dist/quill.js' // Enumerable: "linq" }) ] }, }