-
Notifications
You must be signed in to change notification settings - Fork 0
/
postcss.config.mts
82 lines (74 loc) · 1.85 KB
/
postcss.config.mts
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import postcssSyntax from 'postcss-syntax';
const syntax = postcssSyntax({
rules: [
{
test: /\.(?:[sx]?html?|[sx]ht|vue|ux|php)$/i,
extract: 'html',
},
{
test: /\.(?:markdown|md)$/i,
extract: 'markdown',
},
{
test: /\.(?:[cm]?[jt]sx?|es\d*|pac)$/i,
extract: 'jsx',
},
{
// custom language for file extension
test: /\.postcss$/i,
lang: 'scss',
},
],
// custom parser for CSS (using `postcss-safe-parser`)
css: 'postcss-safe-parser',
// custom parser for SASS (PostCSS-compatible syntax.)
sass: 'postcss-sass',
// custom parser for SCSS (by module name)
scss: 'postcss-scss',
// custom parser for LESS (by module path)
less: 'postcss-less',
});
// postcss(plugins)
// .process(source, { syntax: syntax })
// .then(function (result) {
// // An alias for the result.css property. Use it with syntaxes that generate non-CSS output.
// result.content;
// });
import type { Config } from 'postcss-load-config';
const config: Config = {
syntax: 'postcss-scss',
map: 'inline',
plugins: {
'postcss-easy-import': {
extensions: ['.css', '.scss'],
},
stylelint: {
/* your options */
},
'postcss-reporter': { clearReportedMessages: true },
'postcss-use': {},
'postcss-scss': {},
'postcss-html': {},
'postcss-markdown': {},
'postcss-utilities': {},
'postcss-sass': {},
'postcss-safe-parser': {},
'postcss-font-magician': {},
colorguard: {},
'postcss-load-config': {},
autoprefixer: {},
cssnano: {},
'postcss-sorting': {
order: [
'custom-properties',
'dollar-variables',
'declarations',
'at-rules',
'rules',
],
'properties-order': 'alphabetical',
'unspecified-properties-position': 'bottom',
},
},
};
export default config;