Skip to content

Commit

Permalink
Add back browser CJS build as ./dist/index.browser.cjs.js. (#5245)
Browse files Browse the repository at this point in the history
* Add back browser CJS build as ./dist/index.browser.cjs.js.

* Create gorgeous-balloons-confess.md

* Update .changeset/gorgeous-balloons-confess.md

Co-authored-by: Sebastian Schmidt <mrschmidt@google.com>

Co-authored-by: Sebastian Schmidt <mrschmidt@google.com>
  • Loading branch information
yuchenshi and schmidt-sebastian committed Aug 5, 2021
1 parent c52eb48 commit 5bda08e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-balloons-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/storage": patch
---

Adds a browser CJS build as ./dist/index.browser.cjs.js.
5 changes: 4 additions & 1 deletion packages/storage/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ const es5BuildPlugins = [
const es5Builds = [
{
input: './index.ts',
output: { file: pkg.module, format: 'es', sourcemap: true },
output: [
{ file: 'dist/index.browser.cjs.js', format: 'cjs', sourcemap: true },
{ file: pkg.module, format: 'es', sourcemap: true }
],
plugins: [alias(generateAliasConfig('browser')), ...es5BuildPlugins],
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
treeshake: {
Expand Down

0 comments on commit 5bda08e

Please sign in to comment.