mirror of
https://github.com/lscambo13/ElegantFin.git
synced 2026-10-26 17:39:34 +00:00
dev: exclude some files dev: sort declarations alphabetically during minification
22 lines
435 B
JavaScript
22 lines
435 B
JavaScript
const cssDeclarationSorter = require('css-declaration-sorter');
|
|
const cssnano = require('cssnano');
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
cssDeclarationSorter({
|
|
keepOverrides: true,
|
|
order: (a, b) => {
|
|
const aVar = a.startsWith('--');
|
|
const bVar = b.startsWith('--');
|
|
|
|
if (aVar && !bVar) return -1;
|
|
if (!aVar && bVar) return 1;
|
|
|
|
return a.localeCompare(b);
|
|
},
|
|
}),
|
|
cssnano({
|
|
preset: 'default',
|
|
}),
|
|
],
|
|
}; |