Skip to content

Commit

Permalink
fix(nuxt): import preset access in nuxt (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
Holi0317 committed Feb 4, 2024
1 parent 4c11f6d commit 8f5fa30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/histoire-plugin-nuxt/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async function useNuxtViteConfig () {

nuxt.hook('imports:sources', presets => {
const stubbedComposables = ['useNuxtApp']
for (const appPreset of presets.filter(p => p.from.startsWith('#app'))) {
for (const appPreset of presets.filter(p => p.from?.startsWith('#app'))) {
appPreset.imports = appPreset.imports.filter(i => typeof i !== 'string' || !stubbedComposables.includes(i))
}
presets.push({
Expand Down

0 comments on commit 8f5fa30

Please sign in to comment.