You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/05/26 06:37:22 UTC

[GitHub] [echarts] aaronyyan removed a comment on issue #12005: Cannot read property 'extendComponentModel' of undefined at bmap.min.js

aaronyyan removed a comment on issue #12005:
URL: https://github.com/apache/echarts/issues/12005#issuecomment-848505223


   > > > > @z384647062 我现在版本是5.1.1,按照你说的引入,但是地图就没法出来了
   > > > 
   > > > 
   > > > 更新一下:我这边在开发环境下正常,生产环境下无法显示地图,可能是由于BMap的模块引入之后未被调用,在webpack打包(我使用的umi)的时候被优化掉了;
   > > > 以下是我的解决方式(注意引用的顺序):
   > > > ```ts
   > > > import * as echarts from 'echarts/core';
   > > > // import 'echarts/dist/extension/bmap.min.js';
   > > > import _m from 'echarts/extension-src/bmap/BMapView';
   > > > import _v from 'echarts/extension-src/bmap/BMapModel';
   > > > import { version } from 'echarts/extension-src/bmap/bmap';
   > > > console.log(version, _m, _v); // 防止webpack优化
   > > > ```
   > > 
   > > 
   > > Module not found: Error: Can't resolve 'echarts/extension-src/bmap/BMapView' 有遇到吗
   > 
   > 确认下node_modules目录下有是否有/echarts/extension-src/bmap/BMapView
   [https://tva1.sinaimg.cn/large/008i3skNgy1gqvtifhuu5j30f80fa75d.jpg](url) 目录下是有的,我换成`import _m from 'echarts/extension/bmap/BMapView';`可以


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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