From 71ac54361571a22ba2220d8b2213a51f27841d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Thu, 2 Dec 2021 10:36:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/webpack.config.js | 6 +++++- src/assets/api.js | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/webpack.config.js b/config/webpack.config.js index 33d478ef..7e4eb228 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -33,7 +33,7 @@ const appPackageJson = require(paths.appPackageJson); // Source maps are resource heavy and can cause out of memory issue for large source files. const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'; - +// const shouldUseSourceMap = false; const webpackDevClientEntry = require.resolve( 'react-dev-utils/webpackHotDevClient' ); @@ -69,6 +69,8 @@ const lessModuleRegex = /\.module\.less$/; + + const hasJsxRuntime = (() => { if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') { return false; @@ -237,9 +239,11 @@ module.exports = function (webpackEnv) { // module chunks which are built will work in web workers as well. globalObject: 'this', }, + optimization: { minimize: isEnvProduction, minimizer: [ + // This is only used in production mode new TerserPlugin({ terserOptions: { diff --git a/src/assets/api.js b/src/assets/api.js index 239de0bd..7ef1d33d 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -1,6 +1,8 @@ import {Notify} from "zent" -export const baseurl = 'http://192.168.6.75' -window.baseurl = 'http://192.168.6.75'; +export const baseurl = 'https://marketapi.1688sup.com/' +window.baseurl = 'https://marketapi.1688sup.com/'; + + const upload = (method, url, params, responseType) => { let obj = {