Git Product home page Git Product logo

Comments (3)

nevlf avatar nevlf commented on July 21, 2024

开发环境下,可以将 vite.config.ts 中的 server.open 设置为 true,这样就能在浏览器中访问。但是如果需要使用 electron 相关的 api,就会出现你说的那些问题,所以还是不建议使用浏览器运行。electron 本身就集成 chromium,也可以使用控制台进行调试的。

from v3-electron-vite.

ontisme avatar ontisme commented on July 21, 2024

了解,因為我的軟件比較特殊,需要可以局域網訪問比較方便,但又想有桌面版本,Electron的功能本身用的不多,我用的後端是Python,所以可以把Electron的功能改到後端實現

from v3-electron-vite.

nevlf avatar nevlf commented on July 21, 2024

你这种情况,可以把渲染进程的src源码完全替换成web版的源码,这样就只需要维护一套环境的代码。但是有些的地方需要注意,比如electron打包后不支持cookie、后台接口地址也要固定写死的

from v3-electron-vite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.