waveterm/electron.vite.config.ts
Evan Simkowitz 638883eef9
Fix Storybook for TileLayout (#81)
Fix typing of memoized TileLayout component, fix broken Vite config,
upgrade Storybook to latest.
2024-06-26 12:22:27 -07:00

67 lines
1.6 KiB
TypeScript

// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
import react from "@vitejs/plugin-react";
import { defineConfig } from "electron-vite";
import { viteStaticCopy } from "vite-plugin-static-copy";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
main: {
root: ".",
build: {
rollupOptions: {
input: {
index: "emain/emain.ts",
},
},
outDir: "dist/main",
},
plugins: [tsconfigPaths()],
resolve: {
alias: {
"@": "frontend",
},
},
},
preload: {
root: ".",
build: {
sourcemap: true,
rollupOptions: {
input: {
index: "emain/preload.ts",
},
output: {
format: "cjs",
},
},
outDir: "dist/preload",
},
plugins: [tsconfigPaths()],
},
renderer: {
root: ".",
build: {
target: "es6",
sourcemap: true,
outDir: "dist/frontend",
rollupOptions: {
input: {
index: "index.html",
},
},
},
server: {
open: false,
},
plugins: [
react({}),
tsconfigPaths(),
viteStaticCopy({
targets: [{ src: "node_modules/monaco-editor/min/vs/*", dest: "monaco" }],
}),
],
},
});