Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: replace esbuild iife dist with umd, using plugin developed for… #120

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

cjpillsbury
Copy link
Contributor

… this case.

Currently, esbuild does not support and may never natively support a umd target (See: evanw/esbuild#507). However, many build tools or default configurations for web app framework scaffolding tools still unfortunately make a variety of assumptions that result in iife targets insufficient as a "fallback" case (our current strategy). Luckily, since the primary difference between esbuilds iife and a umd build is header/footer content in the resultant .js file (with some *'s around e.g. bundled vs. unbundled that are irrelevant to our usage), someone has built a plugin for this 🎉 (See: https://github.com/Inqnuam/esbuild-plugin-umd-wrapper).

This PR replaces our iife build (and its corresponding identifications in package.json) with a umd flavor instead. Furthermore, I've confirmed that this resolves the default parcel usage locally via a local link.

This will hopefully also resolve the various other build scenarios called out in #88

@cjpillsbury cjpillsbury requested a review from a team as a code owner November 15, 2023 20:40
Copy link

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

👍

@cjpillsbury cjpillsbury merged commit b610dc7 into muxinc:master Nov 15, 2023
3 checks passed
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