首页 / 浏览问题 / WebGIS / 问题详情
@supermap/babel-plugin-import vite配置
zbb
11EXP 2022年10月24日
iClient for OpenLayers 开发指南 (supermap.io)

https://iclient.supermap.io/web/introduction/openlayersDevelop.html#Ready

这个在vite下如何配置 @supermap/babel-plugin-import

2 个回答

直接npm安装后调用不行么?vite的话感觉没有多余的配置吧。
330EXP 2022年10月24日

vue create 创建的项目基于webpack 需要配置@supermap/babel-plugin-import 这个babel

vite我好像不会配置这个 我在 .babelrc 这个里的配置貌似不生效

{
  "plugins": [
    [
      "@supermap/babel-plugin-import",
      {
        "libraryName": "@supermap/iclient-ol"
      }
    ]
  ]
}

您好,如果您是用vite创的vue的话,可以参考一下这个哦,

https://blog.csdn.net/hanjialin1991/article/details/126115817

希望可以帮助到您。

9,733EXP 2022年10月24日
多谢大哥 解决了
你好,请问如何解决的,方便贴一下代码吗
...