Skip to content

fix: point pkgjson#browser at mjs build for webpack 4#191

Merged
gkatsev merged 5 commits into
muxinc:mainfrom
gkatsev:no-browser-field
Apr 21, 2022
Merged

fix: point pkgjson#browser at mjs build for webpack 4#191
gkatsev merged 5 commits into
muxinc:mainfrom
gkatsev:no-browser-field

Conversation

@gkatsev
Copy link
Copy Markdown
Contributor

@gkatsev gkatsev commented Apr 20, 2022

No description provided.

Browser field is mainly used to give a separate build for browsers than
the one aimed at node.js that's in main.

Since we currently target browsers and support node.js via our polyfill,
we don't need a browser field. This also fixes an issue where older
versions of webpack that don't know about the `exports` field will pick
up `browser` over `main` or `module` and thus load in the iife build
instead of the esm or commonjs build.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2022

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

Name Status Preview Updated
elements-demo-create-react-app ✅ Ready (Inspect) Visit Preview Apr 21, 2022 at 3:19PM (UTC)
elements-demo-nextjs ✅ Ready (Inspect) Visit Preview Apr 21, 2022 at 3:19PM (UTC)
elements-demo-svelte-kit ✅ Ready (Inspect) Visit Preview Apr 21, 2022 at 3:19PM (UTC)
elements-demo-vanilla ✅ Ready (Inspect) Visit Preview Apr 21, 2022 at 3:19PM (UTC)
elements-demo-vue ✅ Ready (Inspect) Visit Preview Apr 21, 2022 at 3:19PM (UTC)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2022

Codecov Report

Merging #191 (d8f1062) into main (d6078b8) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
+ Coverage   82.27%   82.29%   +0.02%     
==========================================
  Files          35       35              
  Lines        3717     3717              
  Branches      135      136       +1     
==========================================
+ Hits         3058     3059       +1     
+ Misses        653      652       -1     
  Partials        6        6              
Impacted Files Coverage Δ
packages/mux-player/src/template.ts 94.29% <0.00%> (+0.33%) ⬆️

@gkatsev
Copy link
Copy Markdown
Contributor Author

gkatsev commented Apr 21, 2022

This PR should be squash merged.

Copy link
Copy Markdown
Contributor

@cjpillsbury cjpillsbury left a comment

Choose a reason for hiding this comment

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

Update mux-audio for consistency. Otherwise, 👍

Copy link
Copy Markdown
Contributor

@luwes luwes left a comment

Choose a reason for hiding this comment

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

LGTM, type is not needed anymore?

@gkatsev
Copy link
Copy Markdown
Contributor Author

gkatsev commented Apr 21, 2022

@luwes yeah, we don't really need type, especially since we don't have regular js files that have requires or imports and our main users are still bundlers.

@gkatsev gkatsev merged commit a73a495 into muxinc:main Apr 21, 2022
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.

3 participants