-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.renderer.config.ts
More file actions
30 lines (26 loc) · 816 Bytes
/
vite.renderer.config.ts
File metadata and controls
30 lines (26 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { ConfigEnv, UserConfig } from 'vite';
import { defineConfig } from 'vite';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import svgr from "vite-plugin-svgr";
import { pluginExposeRenderer } from './vite.base.config';
console.log("vite.renderer.config.ts");
// 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}`,
publicDir: 'assets'
},
plugins: [pluginExposeRenderer(name), vanillaExtractPlugin(), svgr()],
resolve: {
preserveSymlinks: true,
},
clearScreen: false,
} as UserConfig;
});