-
Notifications
You must be signed in to change notification settings - Fork 367
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
feat(builder): add an error tip for source.include #4288
feat(builder): add an error tip for source.include #4288
Conversation
🦋 Changeset detectedLatest commit: 63bccbc The changes in this PR will be included in the next version bump. This PR includes changesets to release 217 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4288 +/- ##
==========================================
- Coverage 57.59% 56.44% -1.16%
==========================================
Files 672 663 -9
Lines 17794 18101 +307
Branches 3876 3956 +80
==========================================
- Hits 10249 10217 -32
- Misses 6934 7223 +289
- Partials 611 661 +50 ☔ View full report in Codecov by Sentry. |
Summary
Original Error
Formatted Error
🤖 Generated by Copilot at 63bccbc
This pull request adds a new feature to the
@modern-js/utils
and@modern-js/builder-shared
packages to improve the error reporting of webpack compilation. It enhances the error messages with tips or suggestions for common problems, and colorizes the output for better readability. It also adds a changeset file and a test file to document and verify the changes.Details
🤖 Generated by Copilot at 63bccbc
chalk
module to theformatWebpackMessages
function in the@modern-js/builder-shared
package to colorize the output messages (link)addErrorTips
and a new typeErrorHelper
to the@modern-js/utils
package to enhance the error messages with tips or suggestions (link)formatWebpackMessages
function in the@modern-js/utils
package to accept acolor
parameter and to use theaddErrorTips
function to format the errors (link, link)errorTips
to the result object returned by theformatWebpackMessages
function in the@modern-js/utils
package to contain the formatted error tips (link)formatWebpack.test.ts
to the@modern-js/utils
package to test theaddErrorTips
function with different scenarios and snapshots (link)Related Issue
Checklist
pnpm run change
.