Warning: "main and preload config is missing" #803
Unanswered
FunctionDJ
asked this question in
Q&A
Replies: 2 comments
-
|
I noticed that I never deleted |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@FunctionDJ I experienced the same issue and changing the file names to index.js fixed it eg main/index.js and preload/index.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I like to use defaults as much as possible / as little custom config as possible.
The docs show the following as the most basic config file:
This config doesn't work and running
npx electron-viteprints something like the following error:Well, there are defaults as specified further down on the docs page.
It's just that specifying
main: {}overwrites these defaults, so if someone wants to use e.g. the defaultbuild.lib.entry, they need to remove themainproperty altogether.When I remove the
mainandpreloadproperties thebuild.lib.entryis found, however runningnpx electron-vitewill print the following warning:So I'm confused now. As far as I can tell I have these options:
Are defaults encouraged or not? Should I omit the
mainandpreloadproperties? What are the approved paths here?Beta Was this translation helpful? Give feedback.
All reactions