storybookjs/storybook

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

Aperta

#26.845 aperta il 15 apr 2024

 (4 commenti) (3 reazioni) (0 assegnatari)TypeScript (10.058 fork)batch import
bugcompatibility with other toolshelp wantednextjssev:S3

Metriche repository

Star
 (89.909 stelle)
Metriche merge PR
 (Merge medio 7g 22h) (184 PR mergiate in 30 g)

Descrizione

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

Guida contributor