umbrella22 / electron-vite-template

This project is a vue3 + Vite + electron project template composed of Vite and rollup. It has the same functions as my previous electron+Vue+template project
Other
398 stars 108 forks source link

缺少rollup依赖,手动安装后,却又提示“__name is not defined” #100

Closed zzjjbbaa closed 1 year ago

zzjjbbaa commented 1 year ago

缺少rollup依赖,手动安装后,却又提示“__name is not defined”

umbrella22 commented 1 year ago

有没有可能,我的readme中说了要用yarn,但是你却用了pnpm

zzjjbbaa commented 1 year ago

有没有可能,我的readme中说了要用yarn,但是你却用了pnpm

已经解决,vite的bug

liuyuu11 commented 1 year ago

有没有可能,我的readme中说了要用yarn,但是你却用了pnpm

已经解决,vite的bug

怎么解决的,我也遇到。yarn安装

zzjjbbaa commented 1 year ago

有没有可能,我的readme中说了要用yarn,但是你却用了pnpm

已经解决,vite的bug

怎么解决的,我也遇到。yarn安装 vite.conifg.ts中 添加 image

liuyuu11 commented 1 year ago

有没有可能,我的readme中说了要用yarn,但是你却用了pnpm

已经解决,vite的bug

怎么解决的,我也遇到。yarn安装 vite.conifg.ts中 添加 image

var defProp = Object.defineProperty; var name = (target, value) => defProp(target, "name", { value, configurable: true }); globalThis.name = __name

我在其他的issue也看到这种解决方案了。但是我感觉这种方案很奇怪,不知道会不会有其他坑在。另外,我另外一台电脑 nodejs 16.17.0 + npm/yarn安装没问题。。这台电脑 nodejs 18.17.0 + yarn 就有这种奇葩问题

umbrella22 commented 1 year ago

@zzjjbbaa @liuyuu11 伙计们现在它可以正常工作了,不过当然使用的也是 @liuyuu11 的办法,不过我区分了环境,仅在开发时添加该方法,build命令下不会添加,测试已经完全通过,很高兴框架能够再次为你们服务,我为我之前的鲁莽言论感到抱歉