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

Missing favicon when using staticDirs configuration option #17008

Closed
dzwarg opened this issue Dec 13, 2021 · 6 comments
Closed

Missing favicon when using staticDirs configuration option #17008

dzwarg opened this issue Dec 13, 2021 · 6 comments

Comments

@dzwarg
Copy link
Contributor

dzwarg commented Dec 13, 2021

Describe the bug
I have a storybook that contains a file: favicon.ico, and it is served with my running storybook when the -s public CLI option is provided. When I update the configuration to use staticDirs: [ '../public' ], and remove the -s public CLI option, my favicon is not loaded, and the default storybook favicon is served instead.

I would expect the favicon.ico file to be served when using the staticDirs configuration option.

To Reproduce

  • Add a custom favicon.ico to any version of storybook running 6.4.9.
  • Run the storybook in the CLI with staticDirs set to the folder containing the favicon.ico.
  • Observe the default Storybook favicon served.

System

Environment Info:

  System:
    OS: Linux 5.10 Alpine Linux
    CPU: (6) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 12.22.5 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.14 - /usr/local/bin/npm

Additional context
It looks like favicons are only processed in the branch that uses options.staticDir, based on server-static.ts L54

@shilman
Copy link
Member

shilman commented Dec 13, 2021

@oscard0m Is this something you can take a look at? 🙏

@michaelfaith
Copy link

I'm experiencing this as well. Glad it's not just me.

@dzwarg
Copy link
Contributor Author

dzwarg commented Jan 3, 2022

This is only a problem when running the storybook in development mode. When the static assets are compiled and served statically, the favicon is correct.

@cakeinpanic
Copy link

Experiencing the same, annoying :(
Switched to base64 for now, waiting for the fix

@shilman
Copy link
Member

shilman commented Jan 14, 2022

Yo-ho-ho!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.17 containing PR #17241 that references this issue. Upgrade today to the @next 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 Jan 14, 2022
@shilman
Copy link
Member

shilman commented Jan 15, 2022

Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.13 containing PR #17241 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade

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

4 participants