| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const { defineConfig } = require('@vue/cli-service')
- module.exports = defineConfig({
- // build编译后不生成资源MAP文件
- productionSourceMap: false,
- lintOnSave: false,
- //开发服务,build后的生产模式还需nginx代理
- devServer: {
- allowedHosts: 'all',
- open: false, //运行后自动打开浏览器
- port: 1988, //挂载端口
- proxy: {
- '/api': {
- target: "http://127.0.0.1:1881/web/",
- ws: true,
- changeOrigin: true,
- pathRewrite: {
- '^/api': '/'
- }
- }
- }
- },
- configureWebpack: {
- //性能提示
- performance: {
- hints: false
- },
- optimization: {
- splitChunks: {
- chunks: "all",
- automaticNameDelimiter: '~',
- name: "webChunks",
- cacheGroups: {
- //第三方库抽离
- vendor: {
- name: "modules",
- test: /[\\/]node_modules[\\/]/,
- priority: -10
- }
- }
- }
- }
- }
- })
|