From da809b0a5b44483593080da1b2edd93c75cdfd18 Mon Sep 17 00:00:00 2001 From: Michael Brevard Date: Mon, 21 Oct 2024 12:35:36 +0300 Subject: [PATCH] perf(vite): avoid redundant postcss plugins overwrite (#29619) --- packages/vite/src/css.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vite/src/css.ts b/packages/vite/src/css.ts index 5a8b82f3fa..9b059082ff 100644 --- a/packages/vite/src/css.ts +++ b/packages/vite/src/css.ts @@ -9,13 +9,12 @@ function sortPlugins ({ plugins, order }: NuxtOptions['postcss']): string[] { } export async function resolveCSSOptions (nuxt: Nuxt): Promise { - const css: ViteConfig['css'] & { postcss: NonNullable['postcss'], string>> } = { + const css: ViteConfig['css'] & { postcss: NonNullable['postcss'], string>> & { plugins: Plugin[] } } = { postcss: { plugins: [], }, } - css.postcss.plugins = [] const postcssOptions = nuxt.options.postcss const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })