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

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

Closed
PavelPolyakov opened this issue Jun 9, 2017 · 14 comments
Closed

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

PavelPolyakov opened this issue Jun 9, 2017 · 14 comments
Assignees
Labels
Milestone

Comments

@PavelPolyakov
Copy link

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,

@PavelPolyakov
Copy link
Author

PavelPolyakov commented Jun 9, 2017

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;
};

@pierrecholhot
Copy link

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

@shilman
Copy link
Member

shilman commented Jun 9, 2017

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?

@PavelPolyakov
Copy link
Author

@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,

@pierrecholhot
Copy link

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

@shilman
Copy link
Member

shilman commented Jun 10, 2017

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! 👍

@shilman
Copy link
Member

shilman commented Jun 10, 2017

Ok, have reproduced the bug and suspect it's due to this PR: #1134 (review)

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

@shilman
Copy link
Member

shilman commented Jun 10, 2017

Ok I have a fix ready here: #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.

@PavelPolyakov
Copy link
Author

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.

@shilman
Copy link
Member

shilman commented Jun 10, 2017

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?

@PavelPolyakov
Copy link
Author

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

@shilman
Copy link
Member

shilman commented Jun 10, 2017

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

@shilman
Copy link
Member

shilman commented Jun 10, 2017

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

@PavelPolyakov
Copy link
Author

@shilman
thank you very much :) #lovestorybookevenmore

@ndelangen ndelangen added this to the v3.1.3 milestone Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants