-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
37 lines (36 loc) · 1018 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
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import tailwind from 'tailwindcss'
import tailwindNested from 'tailwindcss/nesting'
import tailwindConfig from './tailwind.config'
import postcssPresetEnv from 'postcss-preset-env'
import uniTailwind from '@uni-helper/vite-plugin-uni-tailwind'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
css: {
postcss: {
plugins: [
tailwindNested(),
tailwind({
config: tailwindConfig
}),
postcssPresetEnv({
stage: 3,
features: {
'nesting-rules': false
}
})
]
}
},
plugins: [uni(), uniTailwind()],
build: {
sourcemap: process.env.NODE_ENV !== 'development'
}
})