diff --git a/electron-builder.json5 b/electron-builder.json5 index ecb1a8e..50848f9 100644 --- a/electron-builder.json5 +++ b/electron-builder.json5 @@ -17,8 +17,7 @@ */ 'dist/**/*', '!docs/**/*', - '!dist/release/**/*', - '!dist/main/index.ts' + '!dist/release/**/*' ], mac: { bundleVersion: '1.0', diff --git a/vite.config.js b/vite.config.js index 9053097..0ddc861 100644 --- a/vite.config.js +++ b/vite.config.js @@ -39,15 +39,21 @@ export default defineConfig({ eslintPlugin(), // Docs: https://github.com/electron-vite/vite-plugin-electron electronPlugin([ + { + entry: ['src/preload/index.js'], + vite: { + build: { + outDir: 'dist/preload' + } + } + }, { entry: ['src/main/index.ts'], onstart: (options) => { options.startup(['.', '--no-sandbox']) }, vite: { - publicDir: resolve('./src/main'), build: { - emptyOutDir: true, assetsDir: '.', outDir: 'dist/main', rollupOptions: {