context.parameters.fileName is different in static build
See original GitHub issueDescribe 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:
- Created 4 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
bump