caoxiemeihao / nuxt-electron

Integrate Nuxt and Electron
MIT License
191 stars 21 forks source link

How to change outDir from dist-electron ? #48

Closed 53RG1005 closed 1 year ago

53RG1005 commented 1 year 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 1 year 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: {},
  },