Core: Remove pointless module.hot.decline()
in addons
#21421
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.
Closes #21340
What I did
Removed invalid ESM code from our addons.
module
is not defined in.mjs
files, buttsup
was passing this code through.We were getting away with it because our WP rules were fairly permissive (not sure how it was working in Vite). Users seemed to trigger the issue by throwing away some of our rules, in combination with a move towards favouring
.mjs
more in #21161The thing is, it didn't do anything anyway outside of developing the addon, AFAICT. @winkerVSbecks I'm not sure if we should keep it in
addon-kit
or not:https://github.com/storybookjs/addon-kit/blob/4c3224fbbe9d3c663e88d11f563c91ebc10b0b4f/src/index.ts#L1-L3
How to test
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]