question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

context.parameters.fileName is different in static build

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tim-mukhincommented, Mar 6, 2021

@gavmck @imdongchen @Utzel-Butzel @shilman I found the workaround here https://github.com/storybookjs/storybook/issues/5907#issuecomment-470015950 Thought it should be already fixed, but as I’ve mentioned, it’s still an issue in 6.1.

I guess if a project wants to use it’s own webpack config, it will most likely turn on optimization and get caught on this bug. I suppose it would be helpful to point this out in the documentation.

2reactions
OutThisLifecommented, Sep 23, 2020

bump

Read more comments on GitHub >

github_iconTop Results From Across the Web

Log4net: Different Filenames based on Parameters?
I want to be able to create different log files for each origin from the SPHostUrl-Parameter of the HttpContext.
Read more >
Advanced Usage — staticjinja 4.1.3 documentation
This document covers some of staticjinja's more advanced features. ... If the context needs to be different for each template, you can restrict...
Read more >
Context | Android Developers
Can make phone calls (VoIP or otherwise) and want those calls to be integrated into the built-in phone app. ContextThemeWrapper, A context wrapper...
Read more >
Parameters - Storybook
Parameters are a set of static, named metadata about a story, typically used to control the behavior of Storybook features and addons.
Read more >
Static Files - FastAPI
"Mount" a StaticFiles() instance in a specific path. ... All these parameters can be different than " static ", adjust them with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found