Skip to content

Commit 62ba22e

Browse files
committed
Fix Storybook broken local font import
1 parent ae55453 commit 62ba22e

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const config: StorybookConfig = {
88
saveFromControls: false,
99
},
1010
stories: ["../**/*.mdx", "../**/*.stories.ts"],
11-
staticDirs: ["../public"],
11+
staticDirs: ["../public", "./public"],
1212
addons: ["@chromatic-com/storybook", "@storybook/addon-docs", "@storybook/addon-a11y"],
1313
framework: {
1414
name: "@storybook-vue/nuxt", // correct for SB 9.x + @nuxtjs/storybook@9.0.1

.storybook/preview.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Preview } from "@nuxtjs/storybook";
2+
import "./fonts.css";
23

34
const preview: Preview = {
45
parameters: {

nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default defineNuxtConfig({
1414
modules: [
1515
"@nuxt/eslint",
1616
"@nuxt/icon",
17-
"@nuxt/fonts",
17+
...(process.env.STORYBOOK ? [] : ["@nuxt/fonts"]),
1818
"@nuxt/image",
1919
"@nuxtjs/i18n",
2020
"nuxt-qrcode",

0 commit comments

Comments
 (0)