-
Notifications
You must be signed in to change notification settings - Fork 1
/
postcss.config.js
33 lines (31 loc) · 848 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
const path = require('node:path');
module.exports = (ctx) => ({
map: false,
plugins: {
autoprefixer: ctx.env === 'production' ? {} : false,
cssnano: ctx.env === 'production' ? {
preset: ['default', {
discardComments: {
removeAll: true,
},
}],
} : false,
'postcss-import': {
path: [
'vendor/fisharebest/webtrees/resources/css',
'src/scss',
],
},
/**
* TODO: Reconsider inlining font faces and instead defining them on page;
* would need to figure out how to exclude fontawesome.css from PostCSS processing
*/
'postcss-url': {
url: 'inline',
basePath: [
path.resolve('node_modules/@fortawesome/fontawesome-free/webfonts'),
path.resolve('vendor/fisharebest/webtrees/resources/css'),
],
},
},
});