-
Notifications
You must be signed in to change notification settings - Fork 0
/
postcss.config.js
37 lines (35 loc) · 971 Bytes
/
postcss.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
const cssnano = require("cssnano");
const postcssColorMod = require("postcss-color-mod-function");
const postcssPresetEnv = require("postcss-preset-env");
const postcssImport = require("postcss-import");
const postcssUrl = require("postcss-url");
const purgeCss = require("@fullhuman/postcss-purgecss");
const tailwindCss = require("tailwindcss");
const production = !process.env.ROLLUP_WATCH;
module.exports = {
plugins: [
postcssImport(),
postcssUrl(),
tailwindCss(),
postcssPresetEnv({
stage: 0,
features: {
"focus-within-pseudo-class": false,
},
autoprefixer: {
grid: false,
},
}),
postcssColorMod(),
cssnano({
autoprefixer: false,
preset: ["default"],
}),
production &&
purgeCss({
content: ["./**/*.html", "./**/*.svelte"],
safelist: [/.*iti.*/],
defaultExtractor: (content) => content.match(/[A-Za-z0-9-_:/]+/g) || [],
}),
],
};