Configure Electron Vite with a Custom Folder Structure - Stack Overflow

Configure Electron Vite with a Custom Folder StructureI am working on an Electron Vite project and wan

Configure Electron Vite with a Custom Folder Structure

I am working on an Electron Vite project and want to use a custom folder structure instead of the default one. However, I am having trouble configuring Vite and Electron to recognize the files in my desired paths. I am using the Electron Fe documentation to set up my project.

Project Structure

This is the folder structure I want to use:

src
├── main
│   ├── main.js
│   ├── paths.js
│   └── Settings.js
├── preload
│   └── preload.js
├── renderer
│   ├── index.html
│   ├── assets
│   │   ├── icons
│   │   ├── images
│   ├── pages
│   │   ├── createNewFolder
│   │   │   ├── index.html
│   │   │   ├── script.js
│   │   │   ├── style.css
│   │   ├── editor
│   │   │   ├── editor.css
│   │   │   ├── editor.js
│   │   │   ├── explorer.css
│   │   │   ├── explorer.js
│   │   │   ├── index.html
│   │   │   ├── style.css
│   │   │   ├── toolbar.css

Problem

By default, Electron Vite expects a different structure, and I cannot get it to work with this anization.

What I have tried

I tried to modify the main entry of the project and the out dir but nothing seems to work.

My goals are:

  • Configure Vite to use src/main, src/main/preload, and src/renderer.
  • Make Electron work without having to move files to the standard structure.

Question

How can I configure Electron Vite to work with this custom folder structure?

Thanks!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744310142a4567906.html

相关推荐

  • Configure Electron Vite with a Custom Folder Structure - Stack Overflow

    Configure Electron Vite with a Custom Folder StructureI am working on an Electron Vite project and wan

    7天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信