'use strict' const path = require('path') function resolve(dir) { return path.join(__dirname, dir) } module.exports = { publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', outputDir: "authon-web", lintOnSave: false, productionSourceMap: false, devServer: { host: '0.0.0.0', port: 8201, open: 'http://localhost:8201/', disableHostCheck: true, compress: true, overlay: { warnings: false, errors: true }, proxy: { '/api/user-service': { target: 'http://localhost:8202', changeOrigin: true, pathRewrite: { '^/api/user-service': '/' } } } }, configureWebpack: { externals: { 'vue': 'Vue', 'vue-router': 'VueRouter', 'vuex': 'Vuex', 'element-ui': 'ELEMENT', 'axios': 'axios' }, name: 'apes-Authon', resolve: { alias: { '@': resolve('src') } }, optimization: { splitChunks: { chunks: 'all', maxInitialRequests: Infinity, minSize: 20000, cacheGroups: { elementUI: { name: 'chunk-element-ui', test: /[\\/]node_modules[\\/]element-ui[\\/]/, priority: 30, reuseExistingChunk: true }, vue: { name: 'chunk-vue', test: /[\\/]node_modules[\\/](vue|vue-router|vuex)[\\/]/, priority: 30, reuseExistingChunk: true }, axios: { name: 'chunk-axios', test: /[\\/]node_modules[\\/]axios[\\/]/, priority: 30, reuseExistingChunk: true }, libs: { name: 'chunk-libs', test: /[\\/]node_modules[\\/]/, priority: 10, reuseExistingChunk: true } } } } }, chainWebpack(config) { config.plugins.delete('preload') config.plugins.delete('prefetch') config.plugins.delete('optimize-css'); } }