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

Theming: v7.0.0-alpha.16 no loader is configured for svg nor png #18789

Closed
matheo opened this issue Jul 26, 2022 · 1 comment
Closed

Theming: v7.0.0-alpha.16 no loader is configured for svg nor png #18789

matheo opened this issue Jul 26, 2022 · 1 comment

Comments

@matheo
Copy link
Member

matheo commented Jul 26, 2022

Describe the bug
Previously in v6.x we had a theme.js like this:

import { create } from '@storybook/theming/create';
import brandImage from '../src/assets/logo-sidebar.svg'

export default create({
  base: 'light',
  ...
  brandImage,
});

but with v7-alpha.16 we're getting an error:

ERR! Error: Build failed with 1 error:
ERR! .storybook/theme.js:2:23: ERROR: No loader is configured for ".svg" files: src/assets/logo-sidebar.svg
ERR!     at failureErrorWithLog (node_modules/esbuild/lib/main.js:1605:15)
ERR!     at node_modules/esbuild/lib/main.js:1251:28
ERR!     at runOnEndCallbacks (node_modules/esbuild/lib/main.js:1034:63)
ERR!     at buildResponseToResult (node_modules/esbuild/lib/main.js:1249:7)
ERR!     at node_modules/esbuild/lib/main.js:1358:14
ERR!     at node_modules/esbuild/lib/main.js:666:9
ERR!     at handleIncomingPacket (node_modules/esbuild/lib/main.js:763:9)
ERR!     at Socket.readFromStdout (node_modules/esbuild/lib/main.js:632:7)
ERR!     at Socket.emit (node:events:527:28)
ERR!     at addChunk (node:internal/streams/readable:315:12)

I've tried a png file with no luck.

System

System:
    OS: Linux 5.15 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish)
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Firefox: 102.0.1
  npmPackages:
    @storybook/addon-a11y: future => 7.0.0-alpha.16 
    @storybook/addon-essentials: future => 7.0.0-alpha.16 
    @storybook/addon-interactions: future => 7.0.0-alpha.16 
    @storybook/angular: future => 7.0.0-alpha.16 
    @storybook/core-server: future => 7.0.0-alpha.16 
    @storybook/testing-library: 0.0.13 => 0.0.13
@shilman
Copy link
Member

shilman commented Aug 12, 2022

Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.19 containing PR #18857 that references this issue. Upgrade today to the @future NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Aug 12, 2022
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

2 participants