diff --git a/src/storybook.ts b/src/storybook.ts index 580eff5a..d5e72646 100644 --- a/src/storybook.ts +++ b/src/storybook.ts @@ -105,6 +105,8 @@ export async function setupStorybook(options: ModuleOptions, nuxt: Nuxt) { logger.info(' ') logger.info('✔ Storybook build done ') logger.info(' ') + // @ts-expect-error: officially import.meta.env is never undefined, but in practice it can be + import.meta.env = import.meta.env || {} import.meta.env.__STORYBOOK__ = JSON.stringify(options) })