From 447adc74e89eac360eff4265139455d548d41652 Mon Sep 17 00:00:00 2001 From: wkj <278599135@.com> Date: Thu, 11 Apr 2024 11:02:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=85=A5=20process.env.PROD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/mp/env.js | 1 + config/native/babelEnvPlugin.js | 1 + config/web/env.js | 1 + 3 files changed, 3 insertions(+) diff --git a/config/mp/env.js b/config/mp/env.js index f598c77..aa5dba4 100644 --- a/config/mp/env.js +++ b/config/mp/env.js @@ -58,6 +58,7 @@ function getClientEnvironment() { NODE_ENV: process.env.NODE_ENV || 'development', // process.env.OAK_PLATFORM: wechatMp | web | node OAK_PLATFORM: 'wechatMp', + PROD: process.env.PROD, } ); // Stringify all values so we can feed into webpack DefinePlugin diff --git a/config/native/babelEnvPlugin.js b/config/native/babelEnvPlugin.js index 9bdfb42..ddb88c7 100644 --- a/config/native/babelEnvPlugin.js +++ b/config/native/babelEnvPlugin.js @@ -3,6 +3,7 @@ const assert = require('assert'); const REPLACE_HOLDERS = { OAK_PLATFORM: 'native', + PROD: process.env.PROD, }; function replaceEnvExpressionPlugin() { diff --git a/config/web/env.js b/config/web/env.js index 131e6a4..841451b 100644 --- a/config/web/env.js +++ b/config/web/env.js @@ -90,6 +90,7 @@ function getClientEnvironment(publicUrl) { FAST_REFRESH: process.env.FAST_REFRESH !== 'false', // process.env.OAK_PLATFORM: wechatMp | web | node OAK_PLATFORM: 'web', + PROD: process.env.PROD, } ); // Stringify all values so we can feed into webpack DefinePlugin