From e4018d1225fec9969c6743bf8aa5cf7021f7040d Mon Sep 17 00:00:00 2001 From: daminglu Date: Wed, 4 Apr 2018 15:58:00 -0700 Subject: [PATCH] Fix dagre-d3 require issue (#359) --- frontend/package.json | 1 - frontend/src/graph/ui/Chart.vue | 1 - frontend/template/index.html | 1 + frontend/tool/webpack.config.js | 5 ++++- visualdl/logic/sdk.h | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index f4de1974..ccb3b228 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -19,7 +19,6 @@ "d3": "^4.7.4", "d3-format": "^1.2.1", "dagre": "^0.8.2", - "dagre-d3": "^0.6.1", "echarts": "^4.0.0", "echarts-gl": "^1.1.0", "file-saver": "^1.3.3", diff --git a/frontend/src/graph/ui/Chart.vue b/frontend/src/graph/ui/Chart.vue index 3f23e436..69c54dda 100644 --- a/frontend/src/graph/ui/Chart.vue +++ b/frontend/src/graph/ui/Chart.vue @@ -22,7 +22,6 @@ // for d3 drawing import * as d3 from "d3"; import * as dagre from "dagre"; - import * as dagreD3 from 'dagre-d3'; export default { props: ['fitScreen', 'download', 'scale', 'curNode'], diff --git a/frontend/template/index.html b/frontend/template/index.html index 198a8895..1c9a51e5 100755 --- a/frontend/template/index.html +++ b/frontend/template/index.html @@ -6,6 +6,7 @@ +
diff --git a/frontend/tool/webpack.config.js b/frontend/tool/webpack.config.js index b23116f7..837b2a1a 100644 --- a/frontend/tool/webpack.config.js +++ b/frontend/tool/webpack.config.js @@ -123,7 +123,10 @@ const config = { test: /\.(styl)$/ }), new ExtractTextPlugin({filename: '[name].css'}) - ] + ], + externals: { + dagreD3: 'dagre-d3' + } }; // template config diff --git a/visualdl/logic/sdk.h b/visualdl/logic/sdk.h index eae5acab..4ea68f44 100644 --- a/visualdl/logic/sdk.h +++ b/visualdl/logic/sdk.h @@ -440,8 +440,8 @@ private: }; /* -* Audio reader. -*/ + * Audio reader. + */ struct AudioReader { using value_t = typename Audio::value_t; -- GitLab