Skip to content

Commit

Permalink
fix: __STROYBOOK__ env
Browse files Browse the repository at this point in the history
  • Loading branch information
baixiaoyu2997 committed Apr 16, 2024
1 parent 67ff54e commit f055891
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default defineNuxtModule<ModuleOptions>({
},
async setup(options, nuxt) {

if(import.meta.env.__STORYBOOK__)
if(import.meta.env?.__STORYBOOK__)
return

logger.info('🔌 Storybook Module Setup')
Expand Down
2 changes: 1 addition & 1 deletion src/storybook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export async function setupStorybook(options: ModuleOptions, nuxt: Nuxt) {
logger.info(' ')
logger.info('✔ Storybook build done ')
logger.info(' ')
process.env.__STORYBOOK__ = JSON.stringify( options )
import.meta.env.__STORYBOOK__ = JSON.stringify( options )
})

logger.info('🔗 STORYBOOK_URL :', STORYBOOK_URL)
Expand Down

0 comments on commit f055891

Please sign in to comment.