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
评论列表(0条)