-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
47 lines (44 loc) · 1.54 KB
/
vite.config.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
37
38
39
40
41
42
43
44
45
46
47
import { defineConfig } from "vite";
import legacy from "@vitejs/plugin-legacy";
import postcssImport from "postcss-import";
import postcssUnroot from "postcss-unroot";
import postcssColorRgb from "postcss-color-rgb";
import postcssPseudoelements from "postcss-pseudoelements";
import postcssFlexbugsFixes from "postcss-flexbugs-fixes";
import postcssNested from "postcss-nested";
import postcssNesting from "postcss-nesting";
import postcssSelectorMatches from "postcss-selector-matches";
import postcssCustomProperties from "postcss-custom-properties";
import postcssMediaMinmax from "postcss-media-minmax";
import postcssUtilities from "postcss-utilities";
import postcsscolorRgbaFallback from "postcss-color-rgba-fallback";
import autoprefixer from "autoprefixer";
import cssnano from "cssnano";
var browserslistStr = "cover 99.5%";
export default defineConfig({
plugins: [
legacy({
targets: [browserslistStr],
}),
],
css: {
postcss: {
plugins: [
postcssImport(),
postcssUnroot({ method: "copy" }),
postcssColorRgb(),
postcssPseudoelements(),
postcssFlexbugsFixes(),
postcssNested(),
postcssNesting(),
postcssSelectorMatches(),
postcssCustomProperties({ preserve: false }),
postcssMediaMinmax(),
postcssUtilities({ ie8: true }),
postcsscolorRgbaFallback({ oldie: true }),
autoprefixer({ overrideBrowserslist: browserslistStr }),
cssnano({ preset: "default" }),
],
},
},
});