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

Navigation broken after upgrade to 6 (only in static build) #12128

Closed
sakulstra opened this issue Aug 19, 2020 · 2 comments
Closed

Navigation broken after upgrade to 6 (only in static build) #12128

sakulstra opened this issue Aug 19, 2020 · 2 comments

Comments

@sakulstra
Copy link

Describe the bug
When running storybook in dev mode everything works as it should. When running the static build build-storybook -s ./src/fonts -o public the navigation doesn't work any more. Clicking on a navigation link changes the url, but not the view -> reloading will open the page on that specific page though,

To Reproduce
That's kinda hard - I cannot reproduce it in a new demo project and i cannot share our work project :(

Expected behavior
Navigation should work 🤷

Screenshots
gifcast_200819111559

System:

Environment Info:

  System:
    OS: Linux 5.4 Manjaro Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v12.13.0/bin/yarn
    npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
  Browsers:
    Firefox: 79.0

Additional context
Might be related to #10782, #11590 ( i tried regenerating lockfiles, but it didn't help)

We're not using any fancy plugins, but typescript and a mixture of new and old story format.

// main
module.exports = {
  stories: ['../**/*.stories.@(ts|tsx)'],
  addons: [
    '@storybook/addon-actions',
    '@storybook/addon-links',
    '@storybook/addon-viewport',
  ],
};
// preview
import React from 'react';
import { addDecorator, addParameters } from '@storybook/react';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import CssBaseline from '../src/components/CssBaseline';
import { MuiThemeProvider } from '@material-ui/core/styles';
import legalheadusTheme from '../src/themes/legalheadus';

const Decorator = (fn) => (
  <MuiThemeProvider theme={legalheadusTheme}>
    <CssBaseline />
    {fn()}
  </MuiThemeProvider>
);

addDecorator(Decorator);

addParameters({
  options: {
    panelPosition: 'bottom',
  },
  viewport: { viewports: INITIAL_VIEWPORTS },
});
@shilman
Copy link
Member

shilman commented Aug 19, 2020

closing as dupe to #11958

@shilman shilman closed this as completed Aug 19, 2020
@sakulstra
Copy link
Author

sorry didn't see that, thx for pointing me to the correct ticket 👍

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