Skip to content

Commit 5e93d5b

Browse files
committed
fix(playground): mock invalidate function in fakePluginContext
1 parent 0107eec commit 5e93d5b

File tree

1 file changed

+2
-2
lines changed
  • playground/src/composables

1 file changed

+2
-2
lines changed

playground/src/composables/uno.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { evaluateUserConfig } from '#docs'
66
import { unocssBundle } from '#docs/unocss-bundle'
77
import reset from '@unocss/reset/tailwind.css?raw'
88
import MagicString from 'magic-string'
9-
import { createGenerator } from 'unocss'
9+
import { createGenerator, noop } from 'unocss'
1010

1111
export const init = ref(false)
1212
export const customConfigError = ref<Error>()
@@ -122,7 +122,7 @@ function useTransformer() {
122122
return []
123123

124124
const annotations = []
125-
const fakePluginContext = { uno } as UnocssPluginContext
125+
const fakePluginContext = { uno, invalidate: noop } as UnocssPluginContext
126126
for (const { idFilter, transform } of transformers) {
127127
if (idFilter && !idFilter(id))
128128
continue

0 commit comments

Comments
 (0)