Skip to content

Commit

Permalink
Update packages/vite/src/node/plugins/css.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Shinigami <[email protected]>
  • Loading branch information
vitalybaev and Shinigami92 authored Sep 21, 2022
1 parent 0014ccd commit 06afbf5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1068,12 +1068,10 @@ async function resolvePostcssConfig(
config: ResolvedConfig,
dialect = 'css'
): Promise<PostCSSConfigResult | null> {
if (!postcssConfigCache[dialect]) {
postcssConfigCache[dialect] = new WeakMap<
ResolvedConfig,
PostCSSConfigResult | null
>()
}
postcssConfigCache[dialect] ??= new WeakMap<
ResolvedConfig,
PostCSSConfigResult | null
>()

let result = postcssConfigCache[dialect].get(config)
if (result !== undefined) {
Expand Down

0 comments on commit 06afbf5

Please sign in to comment.