-
Notifications
You must be signed in to change notification settings - Fork 72
/
vite.config.ts
38 lines (34 loc) · 987 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 webExtension from '@samrum/vite-plugin-web-extension'
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import { getManifest } from './manifest.config'
const dev = process.env.NODE_ENV === 'development'
export const outDir = dev ? 'dist/dev' : 'dist/build'
// https://vitejs.dev/config/
export default defineConfig({
build: {
emptyOutDir: false,
outDir,
},
optimizeDeps: {
exclude: ['mipd', 'viem', '@vanilla-extract/css'],
},
plugins: [
tsconfigPaths(),
react(),
vanillaExtractPlugin(),
webExtension({
additionalInputs: {
html: [
'src/index.html',
'src/entries/iframe/index.html',
'src/components/_playground/index.html',
'src/design-system/_playground/index.html',
],
},
manifest: getManifest({ dev }),
}),
],
})