Closed Dozorengel closed 3 months ago
7.4.0
31.4.0
macOS 14.6
No response
I try to load multiple html files within a single vite.renderer.config.ts. I set two entry points in rollupOptions like this:
import type { ConfigEnv, UserConfig } from "vite" import { defineConfig } from "vite" import { pluginExposeRenderer } from "./vite.base.config" import { resolve } from "path" // https://vitejs.dev/config export default defineConfig((env) => { const forgeEnv = env as ConfigEnv<"renderer"> const { root, mode, forgeConfigSelf } = forgeEnv const name = forgeConfigSelf.name ?? "" return { root, mode, base: "./", build: { outDir: `.vite/renderer/${name}`, }, plugins: [pluginExposeRenderer(name)], resolve: { preserveSymlinks: true, }, clearScreen: false, rollupOptions: { input: { main_window: resolve(__dirname, "index.html"), modal_window: resolve(__dirname, "modal.html"), }, }, } as UserConfig })
It seems to me that forge completely ignores rollupOptions property, as no matter how hard I try, modal.html didn't appear in .vite/renderer dir.
npm run package
Dev mode via npm start is working fine with multiple html. The issue occurs during the build stage
npm start
I made a mistake, I should have added rollupOptions into build section, after that everything is working fine
rollupOptions
build
Pre-flight checklist
Electron Forge version
7.4.0
Electron version
31.4.0
Operating system
macOS 14.6
Last known working Electron Forge version
No response
Expected behavior
I try to load multiple html files within a single vite.renderer.config.ts. I set two entry points in rollupOptions like this:
Actual behavior
It seems to me that forge completely ignores rollupOptions property, as no matter how hard I try, modal.html didn't appear in .vite/renderer dir.
Steps to reproduce
npm run package
, make sure that somehow there are no any other html files except index.htmlAdditional information
Dev mode via
npm start
is working fine with multiple html. The issue occurs during the build stage