UNPKG

vite-plugin-storybook-nextjs

Version:

This is a Vite plugin that allows you to use Next.js features in Vite. It is the basis for `@storybook/experimental-nextjs-vite` and should be used when running portable stories in Vitest.

23 lines (20 loc) 627 B
import { fn } from 'storybook/test'; // src/plugins/next-mocks/alias/cache/index.ts var revalidatePath = fn().mockName( "next/cache::revalidatePath" ); var revalidateTag = fn().mockName( "next/cache::revalidateTag" ); var unstable_cache = fn().mockName("next/cache::unstable_cache").mockImplementation((cb) => cb); var unstable_noStore = fn().mockName( "next/cache::unstable_noStore" ); var cacheExports = { unstable_cache, revalidateTag, revalidatePath, unstable_noStore }; var cache_default = cacheExports; export { cache_default as default, revalidatePath, revalidateTag, unstable_cache, unstable_noStore };