You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/07/28 12:58:12 UTC
[incubator-echarts] branch next updated: chore(devfast): replace
__DEV__ with '_DEV_'
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new b0fb270 chore(devfast): replace __DEV__ with '_DEV_'
b0fb270 is described below
commit b0fb2709b856fa9eb41fbeb9b239f606a90b899c
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Jul 28 20:57:29 2020 +0800
chore(devfast): replace __DEV__ with '_DEV_'
---
build/dev-fast.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/build/dev-fast.js b/build/dev-fast.js
index 7438fdd..50799cb 100644
--- a/build/dev-fast.js
+++ b/build/dev-fast.js
@@ -32,7 +32,12 @@ async function wrapUMDCode() {
return;
}
- fs.writeFileSync(outFilePath, umdWrapperHead + code + umdWrapperTail, 'utf-8');
+ fs.writeFileSync(
+ outFilePath,
+ // Replaced __DEV__ with a same length string to avoid breaking source map
+ umdWrapperHead + code.replace(/__DEV__/g, "\'_DEV_\'") + umdWrapperTail,
+ 'utf-8'
+ );
const sourceMap = JSON.parse(fs.readFileSync(outFilePath + '.map', 'utf-8'));
// Fast trick for fixing source map
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org