mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
34 lines
720 B
TypeScript
34 lines
720 B
TypeScript
import { defineUntypedSchema } from 'untyped'
|
|
|
|
export default defineUntypedSchema({
|
|
postcss: {
|
|
/**
|
|
* Options for configuring PostCSS plugins.
|
|
*
|
|
* https://postcss.org/
|
|
* @type {Record<string, any> & { autoprefixer?: any; cssnano?: any }}
|
|
*/
|
|
plugins: {
|
|
/**
|
|
* https://github.com/postcss/autoprefixer
|
|
*/
|
|
autoprefixer: {},
|
|
|
|
/**
|
|
* https://cssnano.co/docs/config-file/#configuration-options
|
|
*/
|
|
cssnano: {
|
|
$resolve: async (val, get) => {
|
|
if (val || val === false) {
|
|
return val
|
|
}
|
|
if (await get('dev')) {
|
|
return false
|
|
}
|
|
return {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|