-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
38 lines (32 loc) · 1004 Bytes
/
vite.config.ts
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
31
32
33
34
35
36
37
38
import { defineConfig } from "vite";
import sveltePreprocess from "svelte-preprocess"; // BOLT_SVELTE_ONLY
import { viteSingleFile } from "vite-plugin-singlefile";
import { figmaPlugin, figmaPluginInit, runAction } from "vite-figma-plugin";
import { svelte } from "@sveltejs/vite-plugin-svelte"; // BOLT_SVELTE_ONLY
import react from "@vitejs/plugin-react"; // BOLT_REACT_ONLY
import vue from "@vitejs/plugin-vue"; // BOLT_VUE_ONLY
import { config } from "./figma.config";
const action = process.env.ACTION;
const mode = process.env.MODE;
if (action)
runAction(
{},
// config,
action
);
figmaPluginInit();
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(), // BOLT_REACT_ONLY
vue(), // BOLT_VUE_ONLY
svelte({ preprocess: sveltePreprocess({ typescript: true }) }), // BOLT_SVELTE_ONLY
viteSingleFile(),
figmaPlugin(config, mode),
],
build: {
assetsInlineLimit: Infinity,
emptyOutDir: false,
outDir: ".tmp",
},
});