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/12/06 06:09:31 UTC

[incubator-echarts-www] branch master updated: fix svg import in builder. fix apache/incubator-echarts#13761

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-www.git


The following commit(s) were added to refs/heads/master by this push:
     new c81f53a  fix svg import in builder. fix apache/incubator-echarts#13761
c81f53a is described below

commit c81f53a72c283186b5e3670ef0be6db38c802e7f
Author: pissang <bm...@gmail.com>
AuthorDate: Sun Dec 6 14:09:17 2020 +0800

    fix svg import in builder. fix apache/incubator-echarts#13761
---
 builder/build.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/builder/build.js b/builder/build.js
index 6301166..6be16b2 100644
--- a/builder/build.js
+++ b/builder/build.js
@@ -20,6 +20,7 @@ define(function (require) {
     var urlArgs = '__v__=' + (+new Date());
 
     var topCode = [`export * from "echarts/src/echarts";`];
+    var srcFolder = isVersion5 ? 'esm' : 'src';
 
     if (BUILD_CONFIG.api) {
         topCode.push(`export * from "echarts/src/export";`);
@@ -39,11 +40,11 @@ define(function (require) {
         component && topCode.push(`import "echarts/src/component/${component}";`);
     });
 
-    if (BUILD_CONFIG.vml) {
-        topCode.push(`import "zrender/src/vml/vml";`);
+    if (BUILD_CONFIG.vml && !isVersion5) {
+        topCode.push(`import "zrender/${srcFolder}/vml/vml";`);
     }
     if (BUILD_CONFIG.svg) {
-        topCode.push(`import "zrender/src/svg/svg";`);
+        topCode.push(`import "zrender/${srcFolder}/svg/svg";`);
     }
 
     // Always require log and time axis
@@ -52,8 +53,6 @@ define(function (require) {
         `import "echarts/src/scale/Log";`
     );
 
-    var srcFolder = isVersion5 ? 'esm' : 'src';
-
     var npmEntries = {};
     var pathsConfig = {
         'echarts/src': `/echarts@${version}/${srcFolder}`


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org