forked from winduum/winduum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.prod.js
36 lines (34 loc) · 1.08 KB
/
vite.config.prod.js
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
import { resolve } from 'path'
import tailwindcss from 'tailwindcss'
import tailwindcssNesting from 'tailwindcss/nesting'
import autoprefixer from 'autoprefixer'
import postcssImport from 'postcss-import'
import postcssNesting from 'postcss-nesting'
import postcssCustomMedia from 'postcss-custom-media'
import FastGlob from 'fast-glob'
export default {
css: {
postcss: {
plugins: [postcssImport, tailwindcssNesting(postcssNesting), postcssCustomMedia, tailwindcss, autoprefixer]
}
},
resolve: {
alias: {
'/src': resolve(process.cwd(), 'src')
}
},
root: resolve(process.cwd(), 'playground'),
publicDir: resolve(process.cwd(), 'public'),
envDir: process.cwd(),
build: {
emptyOutDir: false,
outDir: resolve(process.cwd(), 'dist'),
rollupOptions: {
input: FastGlob.sync(['./src/*.css']).map(entry => resolve(process.cwd(), entry)),
output: {
assetFileNames: '[name].[ext]',
chunkFileNames: '[name].js'
}
}
}
}