build: replace esbuild iife dist with umd, using plugin developed for… #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… this case.
Currently,
esbuild
does not support and may never natively support aumd
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 iniife
targets insufficient as a "fallback" case (our current strategy). Luckily, since the primary difference betweenesbuild
siife
and aumd
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 aumd
flavor instead. Furthermore, I've confirmed that this resolves the defaultparcel
usage locally via a local link.This will hopefully also resolve the various other build scenarios called out in #88