Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目打包成64位exe后,内部接口网络配置丢失 #127

Open
641009368 opened this issue Sep 26, 2024 · 1 comment
Open

项目打包成64位exe后,内部接口网络配置丢失 #127

641009368 opened this issue Sep 26, 2024 · 1 comment

Comments

@641009368
Copy link

正常调试状态下是没有问题的,我的网络配置文件是在frontends-.env.development文件里
然后在常量里进行引用,例如:
export default {
// 版本号
version: appPackage.version,

// API地址
apiUrl: import.meta.env.VITE_API_URL,

// websocket地址
webscoketApi: import.meta.env.VITE_GLOB_WS_URL,
.......................

现在打成exe安装后,就读写不到env.development文件了,我在 electron 下的 config里,也尝试使用 dev.env.js prod.env.js配置,但都没有效果,exe访问接口依旧报错network error ,下面是我的项目结构:

@641009368
Copy link
Author

Uploading 5303ba69aa33dcb98a046d75193316f.png…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant