![](/img/trans.png)
[英]Loading 'theme' and 'exporting' module with Highcharts using Requirejs
[英]How to include highcharts exporting module when using webpack?
代替<script src="http://code.highcharts.com/modules/exporting.js"></script>
使用webpack时如何将其添加为依赖项? 它在某些模块下可用吗?
您需要导入并初始化模块:
import Highcharts from 'highcharts';
import exporting from 'highcharts/modules/exporting';
exporting(Highcharts);
或使用要求:
import Highcharts from 'highcharts'
require("highcharts/modules/exporting")(Highcharts);
现场演示: https : //stackblitz.com/edit/react-tepuf4?file=index.js
文件: https : //www.highcharts.com/docs/getting-started/install-from-npm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.