Fix errors at enhanceRollupError
in Vite
#222
Merged
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.
Fixes #221
When an error is thrown during build, Vite attempts to modify the error message with
error.message = "..."
:https://github.com/vitejs/vite/blob/91a1acb12058d7f8ea357b7564992936eed62bc7/packages/vite/src/node/build.ts#L642
Our custom Error class didn't support that, because we add a
get message()
to the class. Adding aset message()
too, ensures Vite doesn't thrown an error during step, so it actually is able to modify the error and throw the correct one being thrown by us.In #221 it changes the error from:
to the correct:
Version
Published prerelease version:
v5.0.0-next.8
Changelog
💥 Breaking Change
@storybook/docs-tools
dependency #190 (@JReinhold)🚀 Enhancement
🐛 Bug Fix
enhanceRollupError
in Vite #222 (@JReinhold)context="module"
withmodule
#217 (@xeho91)autodocs
tag issue and extractingrawCode
#201 (@xeho91)next
Example.stories.svelte
(@xeho91)🏠 Internal
Authors: 4