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.
11 lines (8 loc) • 410 B
TypeScript
import { draftMode as draftMode$1 } from 'next/dist/server/request/draft-mode';
import { Mock } from 'vitest';
export { headers } from './headers.js';
export { cookies } from './cookies.js';
import 'next/dist/server/web/spec-extension/adapters/headers.js';
import 'next/dist/compiled/@edge-runtime/cookies/index.js';
declare const draftMode: Mock<() => ReturnType<typeof draftMode$1>>;
export { draftMode };