Skip to content

What is the extent of requirements of being "statically analyzable" for the v7 store? #18480

Answered by shilman
Jamie5 asked this question in Help
Discussion options

You must be logged in to vote

@Jamie5 i don't have a succinct answer and it will probably change, but here's a first attempt.

When Storybook starts it reads in all the story files and analyzes their contents but does not evaluate their contents. Consider a file Button.stories.js. To analyze its contents we just need to read a single file. To evaluate the contents (i.e. execute the JS in the file) we need to read that file, every file that it depends on, and so on, which is much slower. We use that analysis to build a file called stories.json, which is an index of every story/doc in the project. This is used to fill in the sidebar in Storybook's UI. So, for the most part, it's mostly the data in the sidebar that we car…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@tmeasday
Comment options

@Jamie5
Comment options

@tmeasday
Comment options

@Jamie5
Comment options

@shilman
Comment options

Answer selected by ndelangen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants