fix(exports): avoid "exports is not defined" ReferenceError#5934
fix(exports): avoid "exports is not defined" ReferenceError#5934lukastaegert merged 3 commits intorollup:masterfrom dasa:dasa/exports
ReferenceError#5934Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5934 +/- ##
=======================================
Coverage 98.55% 98.55%
=======================================
Files 270 270
Lines 8704 8704
Branches 1492 1492
=======================================
Hits 8578 8578
Misses 93 93
Partials 33 33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lukastaegert
left a comment
There was a problem hiding this comment.
Hi, thanks for the fix! I think your fix is correct, but it would be nice to have a dedicated "form" test, otherwise there is a chance that a future update might break this again. Here is a suggestion, distilled from the original reproduction:
https://rollupjs.org/repl/?version=4.40.0&shareable=JTdCJTIyZXhhbXBsZSUyMiUzQW51bGwlMkMlMjJtb2R1bGVzJTIyJTNBJTVCJTdCJTIyY29kZSUyMiUzQSUyMmxldCUyMHZhbHVlJTIwJTNEJTIwMCUzQiU1Q25jb25zb2xlLmxvZyh2YWx1ZSklNUNudmFsdWUlMjAlM0QlMjAxJTNCJTVDbiU1Q25leHBvcnQlMjAlN0IlMjB2YWx1ZSUyMGFzJTIwZGVmYXVsdCUyMCU3RCUzQiUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTJDJTIybmFtZSUyMiUzQSUyMm1haW4uanMlMjIlN0QlNUQlMkMlMjJvcHRpb25zJTIyJTNBJTdCJTIyb3V0cHV0JTIyJTNBJTdCJTIyZXhwb3J0cyUyMiUzQSUyMmF1dG8lMjIlMkMlMjJmb3JtYXQlMjIlM0ElMjJhbWQlMjIlN0QlN0QlN0Q=
new dedicated test added |
|
This PR has been released as part of rollup@4.40.2. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
ReferenceErrorin AMD output #5925Description
This PR makes sure that
exportsis defined in AMD, IIFE, and UMD outputs whenoutput.exportsis "auto".