Storybook: Config directory

Created on 9 Oct 2017  路  7Comments  路  Source: storybookjs/storybook

With the 3.3.0 releases, it looks like --config-dir/-c is not being used anymore, but in favour SBCONFIG_CONFIG_DIR, is this likely to change once it goes out of alpha, or is it going to stay?

cli inactive question / support

Most helpful comment

I couldn't find this issue with googling, but I had this same issue and using the ENV var seems to fix the issue.

https://github.com/storybooks/storybook/issues/2501

All 7 comments

From what I can tell:

  • SBCONFIG_CONFIG_DIR has been around for months
  • SBCONFIG_CONFIG_DIR is an alternative way to specify the config dir via env variable, but --config-dir / -c still works just fine

Hope that helps!

I recently upgraded to 3.3.0-alpha.2 and encountered errors, and found that in server/config/utils.js, a new getConfigDir function had been added, which seems to ignore the command line option.

var getConfigDir = exports.getConfigDir = function getConfigDir() {
 return process.env.SBCONFIG_CONFIG_DIR || './.storybook';
};

I'm not sure what other regression errors it has caused, but for me, it no longer loaded preview-head.html into iframe.html.ejs. webpack.config(.prod).js use the above function to get the contents of that file, but it was looking in ./.storybook/preview-head.html without setting SBCONFIG_CONFIG_DIR.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

I have a very similar issue with 3.3.0-alpha.4', but only withpreview-head.html`.

  1. Start on a main line release of Storybook, like what I am using 3.2.15
  2. Setup your config directory somewhere other than /.storybook, add a preview-head.html to that directory and pass -c to the start-storybook.
  3. Run storybook and see your `preview-head.html' injected
  4. Upgrade to alpha 4
  5. Run again and your preview-head changes are gone
  6. Move config and preview-head to /.storybook
  7. Run once more and now see your preview-head changes.

I couldn't find this issue with googling, but I had this same issue and using the ENV var seems to fix the issue.

https://github.com/storybooks/storybook/issues/2501

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings