From 32cdcea6908d5c46899c431ffaad880f9a14c214 Mon Sep 17 00:00:00 2001 From: IU Date: Mon, 8 Jun 2020 22:08:08 +0800 Subject: [PATCH] fix: __DEV__ is not defined (#355) --- rollup.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index a8c4f034..5bb2ff5e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -34,7 +34,7 @@ const builds = { }; function getAllBuilds() { - return Object.keys(builds).map((key) => genConfig(builds[key])); + return Object.keys(builds).map(key => genConfig(builds[key])); } function genConfig({ outFile, format, mode }) { @@ -61,7 +61,7 @@ function genConfig({ outFile, format, mode }) { __DEV__: format === 'es' ? // preserve to be handled by bundlers - `(__DEV__)` + `(process.env.NODE_ENV !== 'production')` : // hard coded dev/prod builds !isProd, }),