-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Split out docs-loader from source-loader #12561
Comments
More context on the problem: https://github.com/storybookjs/storybook/blob/next/addons/storysource/README.md#displaying-full-source In a nutshell:
We shipped the optimized version as the default in 6.0 because we were pressed for time and we were doing everything we could to make performance acceptable before the release. |
Just to add my 2 cents, Would be nice if we could get a couple of options with the source-code when configuring the parameters globally (let's say in preview.js) Maybe adding the possibility for if In our specific case that would be more than welcome and more than enough (and to be honest would also be our prefeered way to handle it) |
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! |
Stale bot just doesn't like this issue and related issues uh? :) |
Fixed in 7.0 and released as @storybook/csf-plugin |
Currently,
source-loader
is used by bothaddon-storysource
andaddon-docs
. It supports bothstoriesOf
andCSF
stories.Until 6.0 the
source-loader
andCSF
cases were quite similar. Late in the release, these use cases diverged a bit for performance's sake (see . Now, the defaultaddon-docs
configuration (not required, but recommended) and the requiredaddon-storysource
configuration don't match.There are a number of related issues resulting from this mess, including (but not limited to): #12208 #8055 #12065 #12557
To address this, I propose:
docs-loader
that ONLY supports CSF.source-loader
.addon-storysource
.A cleanroom
docs-loader
would be substantially simpler because it doesn't need to deal with all thestoriesOf
complexity. From there we could easily add stuff like:The text was updated successfully, but these errors were encountered: