Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: improve virtual module handling to support storybook v8
Fixes #103.
  • Loading branch information
tobiasdiez committed Aug 20, 2024
commit 4ad79d799eba85cf355b8bdf606f1ef70a9bcc0d
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