Storybook: context.parameters.fileName is different in static build

Created on 17 Jun 2019  路  5Comments  路  Source: storybookjs/storybook

Describe the bug
When using context the parameters.fileName is the actual path (e.g. /folder/Button-story.js) in development but will switch to a number (e.g. 1021) in static production build.

To Reproduce
Steps to reproduce the behavior:
Output context in production build.

Expected behavior
context should be the same in development and production

Code snippets

export const withNotes = makeDecorator({
  wrapper: (context) => {
    console.log(context.parameters.fileName);
});

System:

  • Version: 5.1.8
P3 bug core todo

Most helpful comment

bump

All 5 comments

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

I have the same question. Is there a way to get filename in a build?

Me too! Breaks my addon

bump

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrOrz picture MrOrz  路  3Comments

shilman picture shilman  路  3Comments

dnlsandiego picture dnlsandiego  路  3Comments

ZigGreen picture ZigGreen  路  3Comments

sakulstra picture sakulstra  路  3Comments