-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Use babel-loader from react-scripts #5308
Conversation
This seems great, but probably @igor-dv or @ndelangen should approve it as they are closer to this code |
Codecov Report
@@ Coverage Diff @@
## next #5308 +/- ##
==========================================
+ Coverage 40.85% 41.06% +0.21%
==========================================
Files 612 612
Lines 8486 8449 -37
Branches 535 411 -124
==========================================
+ Hits 3467 3470 +3
+ Misses 4927 4924 -3
+ Partials 92 55 -37 Continue to review full report at Codecov.
|
76d8f77
to
42ddd30
Compare
@igor-dv, this should be ready for a re-review now. Thanks! |
@mrmckeb Hello ! Did you try this changes ? I did, in order to do a patch locally. This is what I did in the dist folder :
And
It load but wait forever with these messages :
I found the issue come from here,
The Looking down to the managerPromise:
Here, If I
So either there is something else to do in your PR, or I got it wrong. |
@mrmckeb Adding
In the So I think you have to do something in |
Hi @VincentLanglet, I've been a little stalled on this work sorry, but plan to pick it back up this week. This was more of a POC, it's not ready to merge yet. |
@mrmckeb Hi ! I know it was a POC, I just tried to help you to finish this PR. |
Hello @mrmckeb ; do you need some help ? :) |
Hi @shilman, sorry I was away, and I'm back home again. I've just completed a PR for There were a few suggestions, and I think I'll start this branch again (as it was originally built on Storybook v4) and update the PR this week (or this weekend). @igor-dv had previously stated that he felt this was a little "hacky" *#5308 (diff) - and whilst I don't agree, I can certainly try to find another approach. The issue is that it seems that core takes a lot of the responsibility, and I'm not sure that there will be a cleaner approach to solve this. |
02d6d16
to
d782da6
Compare
Hi all, this version is a little simplified and tests are now working. Sorry again for the long delay before reworking. CC @shilman @igor-dv @VincentLanglet If you're still seeing the previous issue, @VincentLanglet, it would be really helpful to see the output of an |
@mrmckeb Since the new storybook version, I have no issue and I don't need any patch. My |
Thanks @VincentLanglet - I meant to write BUT, I have reproduced your issue and I'm working on a fix. This issue will reappear next time CRA and Storybook go out of sync, so it needs to be fixed at some stage. Thanks :) |
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-feature-cra-babel-loader.storybook.now.sh |
Thanks @igor-dv, I've solved the last issue. This is now (finally) ready for a re-review. |
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.
let's let the webpack gurus weigh in but LGTM
})); | ||
return satisfies(babelLoaderPkg.version, '>=8.0.0-0'); | ||
} catch (e) { | ||
return false; |
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.
In what case there will be an error here ? do we want to hide it ?
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.
Good question @igor-dv. This happens when babel-loader
isn't in the root of node_modules
. When testing, this was sufficient to handle the error and still load successfully.
Something is happening with CI. It shows that the artefact size decreased dramatically. Maybe the |
@igor-dv, I've rebased and I'm pushing up again to see if that helps. Otherwise, do you think it could be related to this? It's the only related change I can think of - but seems odd. |
Can't thing about something specific.. can you try to |
53befcc
to
ea18c13
Compare
@igor-dv It looks like it was that change. I've removed for now as it isn't needed for this PR I believe (correct me if I'm wrong). |
@mrmckeb, but then the |
I mean, that what fixed it, right ? |
ea18c13
to
71d3384
Compare
@igor-dv I only made that change to align with Passing in all options was breaking everything, so I'll try just passing in what's required. Waiting for the CI... |
71d3384
to
074d0f3
Compare
@igor-dv That fixed it, the previously failing tests are now passing. I've just squashed my commits and will merge once the CI has completed again. Thanks for your help. |
Issue: #5183
What I did
This is an attempt to resolve
babel-loader
fromreact-scripts
, rather than installing our own.How to test
This is not ready to merge, it needs local testing and unit tests will be added.