2022-08-26 15:47:29 +00:00
|
|
|
import { defineUntypedSchema } from 'untyped'
|
2022-02-25 19:11:01 +00:00
|
|
|
|
2022-08-26 15:47:29 +00:00
|
|
|
export default defineUntypedSchema({
|
2022-02-25 19:11:01 +00:00
|
|
|
postcss: {
|
|
|
|
/**
|
|
|
|
* Options for configuring PostCSS plugins.
|
|
|
|
*
|
|
|
|
* https://postcss.org/
|
2023-10-30 08:57:11 +00:00
|
|
|
* @type {Record<string, any> & { autoprefixer?: any; cssnano?: any }}
|
2022-02-25 19:11:01 +00:00
|
|
|
*/
|
|
|
|
plugins: {
|
|
|
|
/**
|
|
|
|
* https://github.com/postcss/autoprefixer
|
|
|
|
*/
|
|
|
|
autoprefixer: {},
|
|
|
|
|
2023-10-30 08:57:11 +00:00
|
|
|
/**
|
2024-03-06 20:46:34 +00:00
|
|
|
* https://cssnano.github.io/cssnano/docs/config-file/#configuration-options
|
2023-10-30 08:57:11 +00:00
|
|
|
*/
|
2022-02-25 19:11:01 +00:00
|
|
|
cssnano: {
|
2023-10-30 08:57:11 +00:00
|
|
|
$resolve: async (val, get) => {
|
|
|
|
if (val || val === false) {
|
|
|
|
return val
|
|
|
|
}
|
|
|
|
if (await get('dev')) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return {}
|
2024-04-05 18:08:32 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-08-26 15:47:29 +00:00
|
|
|
})
|