-
Notifications
You must be signed in to change notification settings - Fork 0
/
.postcssrc.js
32 lines (29 loc) · 943 Bytes
/
.postcssrc.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
const fs = require('node:fs');
const path = require('node:path');
const autoprefixer = require('autoprefixer');
const postCssImport = require('postcss-import');
const postCssGlobalData = require('@csstools/postcss-global-data');
const postCssCustomMedia = require('postcss-custom-media');
const postCssMediaMinMax = require('postcss-media-minmax');
const postCssNested = require('postcss-nested');
let globalFiles = [];
const omuiCssRoot = path.resolve('./node_modules/@oreillymedia/omui/dist');
if (fs.existsSync(omuiCssRoot)) {
globalFiles = [path.join(omuiCssRoot, 'custommedia.css')];
}
module.exports = {
// Note that plugins are processed from first to last, and that order can be
// important.
plugins: [
postCssImport,
postCssGlobalData({
files: globalFiles,
}),
postCssCustomMedia({
preserve: true,
}),
postCssMediaMinMax,
postCssNested,
autoprefixer({ remove: false }),
],
};