From 36b283f3fc317d0fa7dde47e1048d2ee3690a9a0 Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 23 Apr 2024 14:52:23 -0400 Subject: [PATCH] Emit a module package file into esm2017 auth webextension bundle (#8191) The Firebase Auth webextension bundle was previously being shipped as a CommonJS package rather than a ES module, because it did not have a module package file indicating that it was an ES module. Fixes #8115 --- .changeset/real-ravens-prove.md | 5 +++++ packages/auth/rollup.config.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/real-ravens-prove.md diff --git a/.changeset/real-ravens-prove.md b/.changeset/real-ravens-prove.md new file mode 100644 index 00000000000..ea2ecca2171 --- /dev/null +++ b/.changeset/real-ravens-prove.md @@ -0,0 +1,5 @@ +--- +'@firebase/auth': patch +--- + +Emit a module package file with esm2017 auth browser extension builds diff --git a/packages/auth/rollup.config.js b/packages/auth/rollup.config.js index c31417ca1a4..46d3ee0380d 100644 --- a/packages/auth/rollup.config.js +++ b/packages/auth/rollup.config.js @@ -125,7 +125,8 @@ const browserWebExtensionBuilds = [ }, plugins: [ ...es2017BuildPlugins, - replace(generateBuildTargetReplaceConfig('esm', 2017)) + replace(generateBuildTargetReplaceConfig('esm', 2017)), + emitModulePackageFile() ], external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)) },