Skip to content

Fix JSZip dynamic import for esbuild#5858

Merged
canova merged 1 commit intofirefox-devtools:mainfrom
canova:jszip-import
Feb 25, 2026
Merged

Fix JSZip dynamic import for esbuild#5858
canova merged 1 commit intofirefox-devtools:mainfrom
canova:jszip-import

Conversation

@canova
Copy link
Member

@canova canova commented Feb 24, 2026

Previously webpack was always using the CommonJS modules and had a transform for ES modules.

JSZip is a CommonJS module, but it looks like now esbuild returns an ES module namespace object for dynamic imports of CommonJS modules. Because of that, the JSZip import contents live inside .default.

I checked other dynamic imports too and it looks like this is the only one that is affected.

Before / After

Previously webpack was always using the CommonJS modules and had a
transform for ES modules.

JSZip is a CommonJS module, but it looks like now esbuild returns an ES
module namespace object for dynamic imports of CommonJS modules. Because
of that, the JSZip import contents live inside .default.

I checked other dynamic imports too and it looks like this is the only
one that is affected.
@canova canova requested review from fatadel and mstange February 24, 2026 20:57
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.56%. Comparing base (37b31b0) to head (19d90ba).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5858   +/-   ##
=======================================
  Coverage   85.56%   85.56%           
=======================================
  Files         319      319           
  Lines       31420    31420           
  Branches     8661     8575   -86     
=======================================
  Hits        26885    26885           
  Misses       4104     4104           
  Partials      431      431           

☔ 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.

@canova canova merged commit 144efe4 into firefox-devtools:main Feb 25, 2026
21 checks passed
@canova canova mentioned this pull request Feb 25, 2026
canova added a commit that referenced this pull request Feb 25, 2026
Changes:

[Nazım Can Altınova] Fix JSZip dynamic import for esbuild (#5858)
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.

2 participants