Open JulienChampagnol opened 4 months ago
@caoxiemeihao any idea of the origin of the issue?
@kingyue737 you seem to understand this repo, maybe you have an idea?
Seems not related to nuxt-electron
, it may be an issue of electron/forge
. Sorry I use electron-builder
instead so I can't give any advice currently.
Thanks for the feedback. So you have no issue with electron builder? Is there any recommendations for choosing builder or forge?
I just encountered this and was mystified. I used a debugger to step by step figure out exactly why it was targeting a parent folder. Here's the relevant bit:
if (packageJSON.config && packageJSON.config.forge) {
d('electron-forge compatible package.json found in', testPath);
return mDir;
}
if (packageJSON.devDependencies?.['@electron-forge/cli'] || packageJSON.devDependencies?.['@electron-forge/core']) {
d('package.json with forge dependency found in', testPath);
return mDir;
}
The directory is determined by the package.json that matches these criteria. Once I figured that out I was good. I don't know why it doesn't just look for the forge.config.* file and go from there though. That would make a lot more sense.
The whole repository ends up in the resources/app folder after npm run package
Here is a reproduction link: https://github.com/Geode-solutions/TestNuxtElectron
Maybe related to https://github.com/electron/forge/issues/3334