Skip to content

fix(exports): avoid "exports is not defined" ReferenceError#5934

Merged
lukastaegert merged 3 commits intorollup:masterfrom
dasa:dasa/exports
May 6, 2025
Merged

fix(exports): avoid "exports is not defined" ReferenceError#5934
lukastaegert merged 3 commits intorollup:masterfrom
dasa:dasa/exports

Conversation

@dasa
Copy link
Contributor

@dasa dasa commented Apr 22, 2025

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

This PR makes sure that exports is defined in AMD, IIFE, and UMD outputs when output.exports is "auto".

@vercel
Copy link

vercel bot commented Apr 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 7:36pm

@codecov
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.55%. Comparing base (cb8f815) to head (144f1de).
Report is 5 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dasa
Copy link
Contributor Author

dasa commented Apr 28, 2025

it would be nice to have a dedicated "form" test

new dedicated test added

@dasa dasa requested a review from lukastaegert April 29, 2025 23:20
@lukastaegert lukastaegert added this pull request to the merge queue May 6, 2025
Merged via the queue into rollup:master with commit 9ea9093 May 6, 2025
41 checks passed
@github-actions
Copy link

github-actions bot commented May 6, 2025

This PR has been released as part of rollup@4.40.2. You can test it via npm install rollup.

@dasa dasa deleted the dasa/exports branch May 6, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"exports is not defined" ReferenceError in AMD output

2 participants