123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- const CompressionPlugin = require("compression-webpack-plugin");
- const webpack = require("webpack");
- const BundleAnalyzerPlugin =
- require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
- module.exports = {
- outputDir: process.env.outputDir,
- publicPath: process.env.NODE_ENV === "production" ? "" : "/",
- productionSourceMap: false,
- lintOnSave: false,
- chainWebpack: (config) => {
- if (process.env.NODE_ENV === "production") {
- if (process.env.npm_config_report) {
- config
- .plugin("webpack-bundle-analyzer")
- .use(
- require("webpack-bundle-analyzer").BundleAnalyzerPlugin
- );
- }
- config.plugins.delete("prefetch");
- }
- },
- configureWebpack: (config) => {
- if (process.env.NODE_ENV === "production") {
- config.optimization = {
- splitChunks: {
- chunks: "all",
- minSize: 10000,
-
-
-
- automaticNameDelimiter: "-",
-
- cacheGroups: {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- },
- },
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- },
- parallel: true,
- devServer: {
- proxy: {
-
- "/market/CMK": {
- target: "http://192.168.2.124:9113",
- ws: false,
- changeOrigin: true,
- pathRewrite: {
- "^/market": "",
- },
- },
- "/aps": {
- target: "http://192.168.2.124:7779",
- ws: false,
- changeOrigin: true,
- logLevel:'debug',
- pathRewrite: {
- "^/aps": "",
- },
- },
- "/market/mk": {
- target: "http://192.168.2.124:9113",
- ws: false,
- changeOrigin: true,
- pathRewrite: {
- "^/market": "",
- },
- },
- "/market/techcentergj": {
- target: "http://192.168.2.124:9113",
- ws: false,
- changeOrigin: true,
- pathRewrite: {
- "^/market": "",
- },
- },
-
-
-
-
-
-
-
-
-
- "/": {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- target: "http://43.138.50.94:9600",
- changeOrigin: true,
-
- },
- },
- },
- transpileDependencies: ["color-string"],
- };
|