dcloudio / uni-app

A cross-platform framework using Vue.js
https://uniapp.dcloud.io
Apache License 2.0
40.18k stars 3.64k forks source link

vue3+vite 项目import * as问题 #4103

Open Ltzero opened 1 year ago

Ltzero commented 1 year ago

问题描述 在项目中要用到echarts,使用本地方式导入 import as echarts from './echarts'; 获得的module是空的 image 直接使用npm安装,从nodemodules里导入 import as echarts from ’echarts‘可以正常访问module内容 60C29015-B3E2-432b-BA87-17CECC16A786 请问是导出方式的问题还是vue3有什么限制,npm的方式导入的echart包太大了,没法发布

系统信息: "vue": "^3.2.45", "@dcloudio/uni-app": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-app-plus": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-components": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-h5": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-mp-alipay": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-mp-baidu": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-mp-lark": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-mp-qq": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3061020221121002", "@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3061020221121002",

Aliom252181 commented 1 year ago

+1