123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- const { defineConfig } = require("@vue/cli-service");
- const BundleAnalyzerPlugin =
- require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
- module.exports = defineConfig({
-
- lintOnSave: false,
- devServer: {
- host: "0.0.0.0",
- port: 8003,
- open: true,
- hot: true,
-
-
-
-
- proxy: {
- "/api": {
- target: "http://121.40.252.139:8089",
- changeOrigin: true,
- ws: true,
- pathRewrite: {
-
- "^/api": "",
- },
- },
- },
- },
- chainWebpack: (config) => {
- config.plugin("webpack-bundle-analyzer").use(BundleAnalyzerPlugin);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- configureWebpack: {
-
- externals: {
-
-
-
-
-
- },
- optimization: {
- splitChunks: {
- chunks: "all",
- minSize: 60000,
- minRemainingSize: 0,
- maxSize: 100000,
- minChunks: 1,
- maxAsyncRequests: 6,
- maxInitialRequests: 4,
- enforceSizeThreshold: 50000,
- cacheGroups: {
- vendors: {
-
- test: /[\\/]node_modules[\\/](?!element-ui)/,
- priority: -10,
- minSize: 30000,
- maxSize: 60000,
- },
- common: {
-
- test: /[\\/]src[\\/]/,
- priority: -20,
- minSize: 20000,
- maxSize: 40000,
- },
- },
- },
- },
- },
- });
|