From 94eef7fa95d863680513e8bcdf98dadaa87c0ebd Mon Sep 17 00:00:00 2001 From: * <8> Date: Thu, 14 Jul 2022 14:49:34 +0800 Subject: [PATCH] Match-id-7204860d15e5008d5a5bc4b77a5abe4855e17ff8 --- scripts/rollup/rollup.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/rollup/rollup.config.js b/scripts/rollup/rollup.config.js index c3c31b49..290490e5 100644 --- a/scripts/rollup/rollup.config.js +++ b/scripts/rollup/rollup.config.js @@ -23,7 +23,8 @@ if (!fs.existsSync(outDir)) { const outputResolve = (...p) => path.resolve(outDir, ...p); function genConfig(mode) { - const sourcemap = mode === 'development' ? 'inline' : false; + const isDev = mode === 'development'; + const sourcemap = isDev ? 'inline' : false; return { input: path.resolve(libDir, 'index.ts'), output: [ @@ -53,7 +54,8 @@ function genConfig(mode) { replace({ values: { 'process.env.NODE_ENV': `"${mode}"`, - isDev: 'true', + isDev: isDev.toString(), + isTest: false, __VERSION__: `"${horizonVersion}"`, }, preventAssignment: true,