ci010 / electron-vue-next

A starter template for using vue-next with the electron.
https://ci010.github.io/electron-vue-next/
191 stars 27 forks source link

Home.Vue中 import { clipboard} from "electron"; 会报错: "__dirname is not defined" #77

Closed shenguanjiejie closed 1 year ago

shenguanjiejie commented 2 years ago
image

image

但是我看在preload的index.ts中, 是可以正常import的. 所以求教这是为什么? 多谢多谢! image

shenguanjiejie commented 2 years ago

我看教程有人在vue.config.js里加上nodeIntegration: true, 就可以解决这个问题, 我也创建了一个vue.config.js文件放在了根目录, 加上后还是不行..

image image
shenguanjiejie commented 2 years ago

@ci010 请大佬帮解下惑, 在线等, 谢谢!