caoxiemeihao / nuxt-electron

Integrate Nuxt and Electron
MIT License
169 stars 18 forks source link

How to change outDir from dist-electron ? #48

Closed 53RG1005 closed 9 months ago

53RG1005 commented 9 months ago
electron: {
    build: [
      {
        // Main-Process entry file of the Electron App.
        entry: 'electron/main.ts',
      },
      {
        onstart(options) {
          // Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete,
          // instead of restarting the entire Electron App.
          options.reload()
        },
        entry: 'electron/preload.ts',
      },
    ],
    outDir: 'test',
    renderer: {},
  },

When i set outDir it does not affect

What should i do ?

caoxiemeihao commented 9 months ago
electron: {
    build: [
      {
        // Main-Process entry file of the Electron App.
        entry: 'electron/main.ts',
+       vite: {
+         build: {
+           outDir: 'you-directory',
+         },
+       },
      },
      {
        onstart(options) {
          // Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete,
          // instead of restarting the entire Electron App.
          options.reload()
        },
        entry: 'electron/preload.ts',
      },
    ],
    outDir: 'test',
    renderer: {},
  },