vite-plugin-electron does not create nested folders inside electron-dist folder by default
T1-Zed opened this issue · 1 comments
T1-Zed commented
Im trying to struct my electron folder like this:
but vite-plugin-electron doesn't create the api folder instead it compiles on the root folder:
this is my vite config file:
import { defineConfig } from "vite";
import electron from "vite-plugin-electron";
import renderer from "vite-plugin-electron-renderer";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
electron([
{
// Main-Process entry file of the Electron App.
entry: "electron/main.ts",
},
{
entry: "electron/preload.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/api/upload.ts",
},
]),
renderer(),
],
});
caoxiemeihao commented
{
entry: 'electron/api/upload.ts',
+ vite: {
+ build: {
+ outDir: 'dist-electron/api',
+ },
+ },
},