Skip to content

Commit

Permalink
perf(vite): avoid redundant postcss plugins overwrite (nuxt#29619)
Browse files Browse the repository at this point in the history
  • Loading branch information
GalacticHypernova authored Oct 21, 2024
1 parent 49242b2 commit 585938f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vite/src/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ function sortPlugins ({ plugins, order }: NuxtOptions['postcss']): string[] {
}

export async function resolveCSSOptions (nuxt: Nuxt): Promise<ViteConfig['css']> {
const css: ViteConfig['css'] & { postcss: NonNullable<Exclude<NonNullable<ViteConfig['css']>['postcss'], string>> } = {
const css: ViteConfig['css'] & { postcss: NonNullable<Exclude<NonNullable<ViteConfig['css']>['postcss'], string>> & { plugins: Plugin[] } } = {
postcss: {
plugins: [],
},
}

css.postcss.plugins = []
const postcssOptions = nuxt.options.postcss

const jiti = createJiti(nuxt.options.rootDir, { alias: nuxt.options.alias })
Expand Down

0 comments on commit 585938f

Please sign in to comment.