项目用到的主要包
包名 | 版本 |
---|---|
vue | 3.2.37 |
vite | 3.0.4 |
@supermap/iclent-ol | 11.0.0 |
ol | 6.15.1 |
查看 @supermap/iclent-ol
引用的 echarts
版本。
{
"name": "@supermap/iclient-ol",
"description": "",
"version": "11.0.0",
"keywords": [
"SuperMap",
"OpenLayers"
],
"main": "namespace.js",
"homepage": "https://iclient.supermap.io",
"repository": {
"type": "git",
"url": "https://github.com/SuperMap/iClient-JavaScript.git"
},
"author": "SuperMap",
"license": "Apache-2.0",
"dependencies": {
"@turf/turf": "6.5.0",
"echarts": "4.9.0",
"mapv": "2.0.62",
"ol": "6.14.1",
"@supermap/iclient-common": "11.0.0",
"proj4": "2.8.0",
"canvg": "3.0.7",
"lodash.remove": "^4.7.0"
}
}
发现引用的是 echarts 4.9.0
而我项目中用的是 5.3.3
有冲突。
去掉我自己的echarts,OK!
编译发现有问题
em。。。。
devDependencies
中导入这两个包
"events": "^3.3.0",
"util": "^0.12.4"
修改一下 vite.config
文件
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
// @ts-ignore
import path from 'path'
export default (mode: string) =>
defineConfig({
base: './',
plugins: [
vue()
],
//这里为了supermap编译添加了配置
define: {
'process.env': {}
}
})
暂时遇到这些坑。