storybook-build injects "undefined" string into the "head"

Created on 9 Jun 2017  路  14Comments  路  Source: storybookjs/storybook

Hi,

Trying to upgrade the storybook to the v3 and webpack 2 config.
And at the end in the storybook-static/index.html I see the next:
image

custom webpack config is used:
https://gist.github.com/PavelPolyakov/df6453e74e6eb47540e5ddfac61add58

I also must say that the dynamic storybook looks well:

start-storybook -p 6006

any hints what can I explore? as it looks a bit ugly:
image

Regards,

bug ui

All 14 comments

Actually, I've just checked that it does this even for the more simple webpack.config.js, which is:

const path = require('path');

const genDefaultConfig = require('@storybook/react/dist/server/config/defaults/webpack.config.js');

module.exports = (config, env) => {
    const sbConfig = genDefaultConfig(config, env);

    sbConfig.resolve.modules = [path.resolve(__dirname, '../app'), path.resolve(__dirname, '../node_modules')];

    return sbConfig;
};

Having this issue as well with no extra webpack config file.

Ugh, sorry about that.

  • any public repo you can share?
  • which version of storybook are you using?
  • are you using head.html / preview-head.html / manager-head.html?

@shilman
Thanks for the quick feedback.
I believe any repo would do. Here is quick CRA + storybook:
https://github.com/PavelPolyakov/storybook-static-build-test/blob/master/storybook-static/index.html

Regards,

@shilman Thanks for the response,
In my case: SB version 3.1.2, yes using preview-head.html to add some global styles

Thanks guys. Looks like this feature wasn't properly tested before it went out, so I'll dig in now and see if I can get a fix out. Sorry for the hassle and thanks for reporting so quickly! 馃憤

Ok, have reproduced the bug and suspect it's due to this PR: https://github.com/storybooks/storybook/pull/1134#pullrequestreview-43285891

I should be able to get out to a fix in the next hour. 馃殌

Ok I have a fix ready here: https://github.com/storybooks/storybook/pull/1248

@pierrecholhot @PavelPolyakov mind giving it a quick review and test? There are testing instructions in the PR. Once you verify, I can push out a fix. Many thanks.

hi @shilman , thanks for the fix.

I would like to help you to test it, but I have a little idea how to install the version which lives in the branch.

Hi @PavelPolyakov. If you can check out the branch on your machine, the commands in the "how to test" should be everything needed to test it?

@shilman , thank you.
Done testing, commented in the PR.

Thanks so much @PavelPolyakov! Will try to get the fix released soon. 馃檱

This has been released in @storybook/[email protected]. Thanks for your help and patience!

@shilman
thank you very much :) #lovestorybookevenmore

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomitrescak picture tomitrescak  路  3Comments

ZigGreen picture ZigGreen  路  3Comments

rpersaud picture rpersaud  路  3Comments

shilman picture shilman  路  3Comments

zvictor picture zvictor  路  3Comments