Nuxt/packages/schema/src/config/postcss.ts

29 lines
686 B
TypeScript
Raw Normal View History

import { defineUntypedSchema } from 'untyped'
export default defineUntypedSchema({
postcss: {
/**
* Options for configuring PostCSS plugins.
*
* https://postcss.org/
* @type {Record<string, any>}
*/
plugins: {
/**
* https://github.com/postcss/autoprefixer
*/
autoprefixer: {},
cssnano: {
$resolve: async (val, get) => val ?? !(await get('dev') && {
preset: ['default', {
// Keep quotes in font values to prevent from HEX conversion
2023-01-20 13:37:41 +00:00
// https://github.com/nuxt/nuxt/issues/6306
minifyFontValues: { removeQuotes: false }
}]
})
}
}
}
})