-
-
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
Builder-Webpack5: Categorize builder error #24031
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yannbf
requested review from
ndelangen,
kasperpeulen and
valentinpalkovic
as code owners
August 31, 2023 10:06
shilman
approved these changes
Aug 31, 2023
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.
Nice one! 💪
yannbf
force-pushed
the
yann/sanitize-errors-more
branch
from
August 31, 2023 12:49
d652cf2
to
039ee11
Compare
yannbf
force-pushed
the
yann/webpack-builder-error
branch
from
August 31, 2023 12:57
6def28f
to
cfdd07d
Compare
yannbf
force-pushed
the
yann/sanitize-errors-more
branch
from
August 31, 2023 14:00
039ee11
to
52ecb89
Compare
yannbf
force-pushed
the
yann/webpack-builder-error
branch
from
August 31, 2023 14:03
cfdd07d
to
78ef2f5
Compare
tmeasday
reviewed
Sep 1, 2023
yannbf
force-pushed
the
yann/webpack-builder-error
branch
from
September 1, 2023 05:35
78ef2f5
to
97c7767
Compare
ndelangen
reviewed
Sep 1, 2023
- also bring back error logging on dev mode, which seemed to be lost in Storybook 7.0.0
yannbf
force-pushed
the
yann/webpack-builder-error
branch
from
September 1, 2023 16:51
97c7767
to
553789e
Compare
tmeasday
approved these changes
Sep 2, 2023
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.
LGTM!
yannbf
changed the title
Builder-Webpack5: categorize builder error
Builder-Webpack5: Categorize builder error
Sep 4, 2023
25 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #24030
What I did
Webpack builder errors before were just an object with a
compilation
property.This PR revamps both the
start
andbuild
processes in the Webpack5 builder, adding categorized Webpack errors, turning Webpack compilation errors into a single, composite error.Turns out there was a bug since Storybook 7 where, if you have Storybook successfully running on dev mode, but then introduce a compilation error, e.g. change the code in
Button.js
to have incorrect syntax likeconzt foo
instead ofconst foo
, the error would not be propagated to the terminal anymore. This was the case in Storybook 6.5, and it stopped working because of changes in the webpack-dev-middleware library. This PR brings that behavior back.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Please check unit tests
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This pull request has been released as version
0.0.0-pr-24031-sha-553789e8
. Install it by pinning all your Storybook dependencies to that version.More information
0.0.0-pr-24031-sha-553789e8
yann/webpack-builder-error
553789e8
1693775701
)To request a new release of this pull request, mention the
@storybookjs/core
team.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=24031