Coder Social home page Coder Social logo

Comments (5)

swift-fs avatar swift-fs commented on June 2, 2024

我可以去掉二级目录解决,但是是和web同构的,所以想尽量保持一致。

from electron-vite-vue.

RSS1102 avatar RSS1102 commented on June 2, 2024

能提供一个最小复现嘛,谢谢。

from electron-vite-vue.

swift-fs avatar swift-fs commented on June 2, 2024

vite.config.ts中的配置里添加 base:'/web2d/',就当前electron-vite-vue这个项目模板build后,打开可执行文件就可以复现。如图:
image

通过pnpm run dev是可以正常跑起来的,pnpm run build后的setup.exe安装打开就报如图的错。

@RSS1102

from electron-vite-vue.

caoxiemeihao avatar caoxiemeihao commented on June 2, 2024

Electron 打包后只识别文件路径,所以必须以 . 开头

- /web2d/
+ ./web2d

from electron-vite-vue.

swift-fs avatar swift-fs commented on June 2, 2024

Electron 打包后只识别文件路径,所以必须以 . 开头

- /web2d/
+ ./web2d

确实可以,非常感谢,vite文档也有写,还是要多看文档啊~~~
image

from electron-vite-vue.

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.