-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathvite.config.js
More file actions
36 lines (35 loc) · 1.21 KB
/
vite.config.js
File metadata and controls
36 lines (35 loc) · 1.21 KB
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 { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import generouted from '@generouted/react-router/plugin'
import postcssGlobalData from '@csstools/postcss-global-data'
import postcssPresetEnv from 'postcss-preset-env'
import browsers from '@github/browserslist-config'
import { globSync } from 'glob'
export default defineConfig({
base: process.env.VITE_BASE_URL || '/',
plugins: [react(), generouted()],
server: { port: 1234 },
css: {
postcss: {
plugins: [
postcssGlobalData({
files: globSync(
'node_modules/@primer/primitives/dist/css/**/*.css'
),
}),
postcssPresetEnv({
stage: 2,
browsers,
// https://preset-env.cssdb.org/features/#stage-2
features: {
'nesting-rules': {
noIsPseudoSelector: true,
},
'focus-visible-pseudo-class': false,
'logical-properties-and-values': false,
},
}),
],
},
},
})