Comments (3)
开发环境下,可以将 vite.config.ts 中的 server.open 设置为 true,这样就能在浏览器中访问。但是如果需要使用 electron 相关的 api,就会出现你说的那些问题,所以还是不建议使用浏览器运行。electron 本身就集成 chromium,也可以使用控制台进行调试的。
from v3-electron-vite.
了解,因為我的軟件比較特殊,需要可以局域網訪問比較方便,但又想有桌面版本,Electron的功能本身用的不多,我用的後端是Python,所以可以把Electron的功能改到後端實現
from v3-electron-vite.
你这种情况,可以把渲染进程的src源码完全替换成web版的源码,这样就只需要维护一套环境的代码。但是有些的地方需要注意,比如electron打包后不支持cookie、后台接口地址也要固定写死的
from v3-electron-vite.
Related Issues (20)
- 为什么使用electron-vue而不是vue-builder HOT 1
- 打包的程序 别的电脑安装运行不了什么情况 HOT 1
- 无法退出登录 HOT 2
- 无法全屏 HOT 3
- 如何将vue部分创建在项目中 HOT 3
- 在 macos10.15.7下打包白屏 HOT 1
- 应用程序无法打开
- 应用程序无法打开 HOT 4
- 更新代码 HOT 3
- vue开发工具 HOT 1
- 打开dialog窗口抖动 HOT 8
- 打包问题 HOT 1
- Preprocessor dependency "sass" failed to load: Cannot read properties of undefined (reading 'pop') HOT 1
- 更改路由页面加载不刷新 HOT 2
- Electron主进程代码文件夹名称问题 HOT 1
- 默认主题的sideBar是不是有问题? HOT 1
- 如何结合bytenode实现源码保护? HOT 1
- 能否支持浏览器打包 HOT 4
- exe安装目录 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v3-electron-vite.