storybookjs/storybook

[Bug]: next/font/local is not worked in storybook with vanilla Extract

Open

#26.845 geöffnet am 15. Apr. 2024

Auf GitHub ansehen
 (4 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)TypeScript (10.058 Forks)batch import
bugcompatibility with other toolshelp wantednextjssev:S3

Repository-Metriken

Stars
 (89.909 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 7T 22h) (184 gemergte PRs in 30 T)

Beschreibung

Describe the bug

I'm going to proceed with the project using NextJS and Storybook. When I try to apply font using localfont, SyntaxError occurs. There seems to be no problem when excluding 'predentardClassname', so that part seems to be the problematic code.

image

but, This problem is not visible when vanilla extract is removed.

To Reproduce

https://github.com/Zero-1016/storybook-playground

System

System:
    OS: Windows 11 10.0.22621
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  Binaries:
    Node: 20.12.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD <----- active
    pnpm: 8.6.6 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
  npmPackages:
    @storybook/addon-essentials: ^8.0.8 => 8.0.8
    @storybook/addon-interactions: ^8.0.8 => 8.0.8
    @storybook/addon-links: ^8.0.8 => 8.0.8
    @storybook/addon-onboarding: ^8.0.8 => 8.0.8
    @storybook/blocks: ^8.0.8 => 8.0.8
    @storybook/nextjs: ^8.0.8 => 8.0.8
    @storybook/react: ^8.0.8 => 8.0.8
    @storybook/test: ^8.0.8 => 8.0.8
    @storybook/testing-library: ^0.2.2 => 0.2.2
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    storybook: ^8.0.8 => 8.0.8

Additional context

No response

Contributor Guide