-
-
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
Addon-storysource: Replace loader with source-loader ✂ #7272
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-task-i-have-removed-storysource-loader.storybook.now.sh |
@@ -1 +1 @@ | |||
module.exports = require('./dist/loader'); | |||
module.exports = require('@storybook/source-loader'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for backward compatibility, but it will be recommended to change the usage in webpack of course.
@@ -35,7 +35,8 @@ | |||
"regenerator-runtime": "^0.12.1" | |||
}, | |||
"peerDependencies": { | |||
"react": "*" | |||
"react": "*", | |||
"@storybook/source-loader": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will ask the developer to pull the source-loader separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shilman @ndelangen should we add this line to our docs?
Please don't use caret when depending on Storybook packages, as we regularly do breaking changes in minor releases
fb17415
to
053aa06
Compare
@libetl Thanks so much for putting this together. It's looking pretty good. Some testing notes:
Single-word seems to work in both storysource and also in docs (view docs, and open "view source"). Multi-word seems to be broken in the current PR. EDIT: I've fixed the problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magnifique! 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@libetl Ok, it looks like build-storybook
in examples/angular-cli
is taking forever in CI. I also see this behavior running on my dev machine.
This brings up a few thoughts:
- Is `parser: 'typescript' even necessary with the new loader?
- Can we make the following options defaults:
injectParameters: true,
inspectLocalDependencies: false,
inspectDependencies: false,
- Why isn't
angular-cli
building, even when I set those options? I get an out of memory error, even updatinginclude: [resolve(__dirname, '../src/stories')]
InjectDependencies and injectLocalDependencies default to false of course |
@libetl did you have a chance to look at the running times? It also results in an out of memory error on my local machine. Not mergeable yet. |
…torysource-loader
Per your suggestion I've verified that the line Here's my proposal:
|
Hmm. Do you want that for 5.2 ? (Just to clarify) |
@libetl Ideally. I just need source-loader to work for 5.2 with both storysource & docs and I think this is the most clean and direct way to do it. I can do it if you're busy. |
Issue: #7192
What I did
I have removed the storysource older loader
Also the new source-loader is not yet compatible with storysource V1 : fixed
How to test
If your answer is yes to any of these, please make sure to include it in your PR.