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
418 stars 111 forks source link

如何动态使用node_modules里面的脚本 #139

Closed rainwalkerhu closed 4 weeks ago

rainwalkerhu commented 1 month ago

image image

mlmdflr commented 1 month ago

请问这样做的场景是什么? 目前我从图片上来看是你的路径可能有问题,你检查下目录是否正确

动态执行node_modules还要考虑打包前后的区别

umbrella22 commented 4 weeks ago

你不应该尝试直接使用node_modules路径,如果该库有对应的node-api你只需要直接在主进程中import并启动即可,如有其他疑问请重新开启该issues