Skip to content

Commit

Permalink
fix: improve virtual module handling to support storybook v8 (#121)
Browse files Browse the repository at this point in the history
Fixes #103.
  • Loading branch information
tobiasdiez committed Aug 20, 2024
1 parent 96984bc commit 30147fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/logger.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { consola } from 'consola'
export const logger = consola.withTag('[storybook:vue]')
// logger.level = LogLevel.Debug
// logger.level = 4 // Debug
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const unpluginFactory: UnpluginFactory<Options | undefined> = (
...options,
})) as { id: string; external: boolean }

// If it cannot be resolved or is external, just return it so that Rollup can display an error
if (!resolution || resolution.external) return resolution
// If it cannot be resolved or is external, return undefined so that the next plugin can handle it
if (!resolution || resolution.external) return undefined

// We append a custom "type" so that the vue plugin is not handling the import
resolution.id = resolution.id + STORIES_INTERNAL_SUFFIX
Expand Down

0 comments on commit 30147fd

Please sign in to comment.