-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.dev.config.ts
More file actions
38 lines (35 loc) · 959 Bytes
/
vite.dev.config.ts
File metadata and controls
38 lines (35 loc) · 959 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
31
32
33
34
35
36
37
38
import { defineConfig } from 'vite'
import { config as configDotEnv } from 'dotenv'
import react from '@vitejs/plugin-react'
import tsconfigPaths from 'vite-tsconfig-paths'
configDotEnv()
if (process.env.NODE_ENV !== 'development') {
throw new Error('Trying to serve project without NODE_ENV=development')
}
export default defineConfig({
define: {
'process.env': process.env
},
plugins: [
react({
babel: {
plugins: [
[
'babel-plugin-styled-components',
{
displayName: true,
fileName: false
},
'babel-plugin-styled-components'
],
]
}
}),
tsconfigPaths(),
],
build: {
sourcemap: false,
target: 'esnext',
minify: 'terser'
}
})