Open bumTomica opened 2 years ago
Going back to the 5.0.1 version it works. I need to include macos-wallpaper manually to dist folder - and dist is part of the build files. But when I do the same with 6+ version it uses the full hardcoded path.
Same issue, not working at mac. version 6.1.1
maybe you could try this i use electron-vite btw its packed on app.asar so you need to exclude it
const wallpaperModulePath = path.resolve(__dirname, 'node_modules', 'wallpaper')
.replace('app.asar', 'app.asar.unpacked')
.replace('out\\main\\', '')
.replace('out/main/', '');
const wallpaperModuleUrl = `file://${wallpaperModulePath.replace(/\\/g, '/')}/index.js`;
const { setWallpaper } = await import(wallpaperModuleUrl);
maybe anyone had better solution
Hello, using
When building dist with electron builder and running the app - the path to macos-wallpaper is for some reason hardcoded to the path of the local project of the device on which it was building.
The problem is the same with asar false and I tried to manually include wallpaper lib in dist and reference it in the project - it works locally but not after the build again.
I didn't even notice this before trying to run the app on another device where there is no locally saved dev directory with macos-wallpaper lib in the same place.
Sentry error after running the build
Not sure if I'm doing something wrong with init or build, please advise.