Skip to content

Commit

Permalink
fix: custom fallback when no components provided
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelschroederdev committed Jul 4, 2023
2 parents 9707e35 + 64fefbf commit 0d582e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vite-plugin-storyblok-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function vitePluginStoryblokComponents(
* import default FallbackComponent bundled with @storyblok/astro
*/
imports.push(
`import FallbackComponent from '@storyblok/astro/FallbackComponent.astro';`
`import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'`
);
}
}
Expand All @@ -107,7 +107,7 @@ export function vitePluginStoryblokComponents(
if (enableFallbackComponent) {
return `${
imports[0]
} export default {${fallbackComponentKey.replace(",", "")}}`;
}; export default {${fallbackComponentKey.replace(",", "")}}`;
}
throw new Error(
`Currently, no Storyblok components are registered in astro.config.mjs.\nPlease register your components or enable the fallback component.\nDetailed information can be found here: https://github.com/storyblok/storyblok-astro`
Expand Down

0 comments on commit 0d582e7

Please sign in to comment.