-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.postcssrc.cjs
35 lines (33 loc) · 1.04 KB
/
.postcssrc.cjs
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
// SPDX-FileCopyrightText: Nextcloud contributors
// SPDX-License-Identifier: AGPL-3.0-or-later
// keep json compatible key naming (double quotes) and comma trailing
/* eslint-disable quotes, quote-props */
module.exports = (ctx) => ({
plugins: [
require('autoprefixer')({ // eslint-disable-line
// browsers: [], // defined in .browserslistrc file!
cascade: true,
add: true,
remove: false,
supports: true,
flexbox: true,
grid: false,
ignoreUnknownVersions: false,
}),
// TODO: move cssnano stage from Postcss to optimize-css-assets-webpack-plugin
ctx.env === 'development'
? null
: require('cssnano')({ // eslint-disable-line
// https://cssnano.co/docs/optimisations
preset: ['default', {
autoprefixer: false, // do not remove prefixes
discardComments: {
removeAll: true,
},
normalizeUrl: false,
normalizeWhitespace: true,
zindex: false,
}],
}),
].filter((e) => e !== null),
});