We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use Next.js 13 Font Module in following code lib/fonts.ts
lib/fonts.ts
import { Inter as FontSans } from 'next/font/google' export const fontSans = FontSans({ subsets: ['latin'], variable: '--font-sans' })
It works normally with next start but failed in storybook. Workaround is to remove the renaming:
next start
import { Inter } from 'next/font/google' export const fontSans = Inter({ subsets: ['latin'], variable: '--font-sans' })
No response
Environment Info: System: OS: macOS 13.4.1 CPU: (8) arm64 Apple M1 Binaries: Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.20.0/bin/yarn npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm Browsers: Chrome: 114.0.5735.248 Safari: 16.5.2 npmPackages: @storybook/addon-essentials: ^7.1.1 => 7.1.1 @storybook/addon-interactions: ^7.1.1 => 7.1.1 @storybook/addon-links: ^7.1.1 => 7.1.1 @storybook/addon-styling: ^1.3.4 => 1.3.4 @storybook/blocks: ^7.1.1 => 7.1.1 @storybook/nextjs: ^7.1.1 => 7.1.1 @storybook/react: ^7.1.1 => 7.1.1 @storybook/testing-library: ^0.2.0 => 0.2.0
The text was updated successfully, but these errors were encountered:
Hi @nhandl3,
That's a known limitation of the implementation. Would you like to contribute to fixing this issue? If you are familiar a bit with AST transformations, you could take a look at https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/src/font/babel/helpers.ts
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
I use Next.js 13 Font Module in following code
lib/fonts.ts
It works normally with
next start
but failed in storybook. Workaround is to remove the renaming:To Reproduce
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: