Skip to content
New issue

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

[Bug]: Global decorators external ressources ignored by storybook-build in version 8 #26902

Open
Treycos opened this issue Apr 21, 2024 · 0 comments

Comments

@Treycos
Copy link

Treycos commented Apr 21, 2024

Describe the bug

Global decorators imports containing CSS are not included in stories of the final storybook build

To Reproduce

Create a React project with Vite ans install Storybook 8

Export a decorator from preview.tsx

const preview: Preview = {
  decorators: [
    (Story) => (
      <Provider>
        <Story />
      </Provider>
    ),
  ],
  parameters,
};

Execute storybook build

Serve the storybook-static folder

System

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
  Binaries:
    Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.4 - ~\AppData\Local\pnpm\pnpm.CMD <----- active
  Browsers:
    Edge: Chromium (123.0.2420.97)
  npmPackages:
    @storybook/addon-a11y: ^8.0.8 => 8.0.8 
    @storybook/addon-actions: ^8.0.8 => 8.0.8 
    @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-themes: ^8.0.8 => 8.0.8 
    @storybook/blocks: ^8.0.8 => 8.0.8 
    @storybook/manager-api: ^8.0.8 => 8.0.8
    @storybook/react: ^8.0.8 => 8.0.8
    @storybook/react-vite: ^8.0.8 => 8.0.8
    @storybook/test: ^8.0.8 => 8.0.8
    @storybook/test-runner: ^0.17.0 => 0.17.0
    @storybook/theming: ^8.0.8 => 8.0.8
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    storybook: ^8.0.8 => 8.0.8

Additional context

No response

@Treycos Treycos changed the title [Bug]: Global decorators ignored by storybook-build in version 8 [Bug]: Global decorators imports ignored by storybook-build in version 8 Apr 21, 2024
@Treycos Treycos changed the title [Bug]: Global decorators imports ignored by storybook-build in version 8 [Bug]: Global decorators external ressources ignored by storybook-build in version 8 Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant