forked from violentmonkey/violentmonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.postcssrc.js
More file actions
19 lines (18 loc) · 717 Bytes
/
Copy path.postcssrc.js
File metadata and controls
19 lines (18 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const { readManifest } = require('./scripts/manifest-helper');
const cfg = require('@gera2ld/plaid/postcss/precss')({});
module.exports = async () => {
const manifest = await readManifest();
const minChrome = parseInt(manifest.minimum_chrome_version);
const minFirefox = parseInt(manifest.browser_specific_settings.gecko.strict_min_version);
if (minChrome < 76 || minFirefox < 67) {
// Disabling `prefers-color-scheme` polyfill because we use our own one
cfg.plugins.forEach((p, i) => {
if ((p.postcss || {}).postcssPlugin === 'precss') {
cfg.plugins[i] = require('precss')({
features: { 'prefers-color-scheme-query': false },
});
}
});
}
return cfg;
};