501351981 / vue-office

支持word(.docx)、excel(.xlsx,.xls)、pdf等各类型office文件预览的vue组件集合,提供一站式office文件预览方案,支持vue2和3,也支持React等非Vue框架。Web-based pdf, excel, word preview library
https://501351981.github.io/vue-office/examples/docs/
MIT License
3.61k stars 432 forks source link

vite vue3 打包报错 vue-demi Cannot access 'a' before initialization #314

Open Laurel-rao opened 2 months ago

Laurel-rao commented 2 months ago
  1. 组件名称及版本: 如@vue-office/docx@1.3.0
  2. 运行环境: 2.1 浏览器:如谷歌浏览器 2.2 vue版本:如vue@2.6.0 2.3 打包工具及版本:
                           vite@4.5.1
                           "vue": "3.4.6",
                  "vue-demi": "^0.14.8",
  3. 问题描述:(如果有报错,麻烦粘贴详细的报错信息、package.json内容等)
dev 运行不报错
build 打包报错
vue-demi-92bac2ad.js:1 Uncaught ReferenceError: Cannot access 'a' before initialization
    at vue-demi-92bac2ad.js:1:101
    at V (vue-demi-92bac2ad.js:1:402)
    at @vue-office-636c0905.js:1:885
    at @vue-office-636c0905.js:1:895
    at @vue-office-636c0905.js:96:21323
pollux2021 commented 2 months ago

有找到解决方法吗?

501351981 commented 2 months ago

凡是Vue中报错的,直接换纯js预览吧

xuelangjie commented 1 month ago

vue3+typescript 里面有解决吗