简体   繁体   English

建立d3-tip时出现Webpack警告

[英]Webpack warning when building d3-tip

I've included d3-tip in my d3 implementation by using the following code: 通过使用以下代码,我在d3实现中包括了d3-tip

import * as d3 from "d3";
import * as d3Tip from "d3-tip";
d3.tip = d3Tip;

However, I'm getting the following warning: 但是,我收到以下警告:

WARNING in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/opsboard/opsboard.vue
75:16-22 "export 'tip' (imported as 'd3') was not found in 'd3'

Anyone got any ideas what's wrong? 任何人都知道有什么问题吗? The tip is working correctly. 尖端工作正常。 Because I'm assigning d3.tip to be d3Tip I don't get why it's exporting it... 因为我将d3.tip分配为d3.tipd3Tip我不明白为什么要导出它...

This code shouldn't cause warnings: 此代码不应引起警告:

import * as d3 from "d3";
import d3Tip from "d3-tip";
...
const tip = d3Tip();
svg.call(tip);

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM