fix(playground): remove broken UMD fallback and add favicon#367
Merged
Conversation
The playground fell back to the UMD build (ts.js) when the IIFE failed to load. The UMD treats @topsort/sdk as an external dependency, so in a browser without a bundler, TopsortClient is undefined and all events are silently dropped after detection. - Remove UMD fallback since it can never work standalone in a browser - Stop deploying ts.js to the playground (unused) - Add empty favicon to suppress 404 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
ts.js) fallback from the playground. The UMD build treats@topsort/sdkas an external dependency — in a browser without a bundler,TopsortClientisundefinedand all events are silently dropped after detection. Only the IIFE bundle (which inlines the SDK) can work standalone.ts.jsto the playground since it's no longer referenced.<link rel="icon" href="data:,">to suppress the favicon 404.Root cause
When the IIFE failed to load (e.g., from a stale browser cache of a previous 404), the playground fell back to the UMD build. The UMD loaded and ran — DOM observation, event detection, and the "No API token" warning all worked — but every API call failed silently because the SDK wasn't available, making it look like events weren't firing.
Test plan
pnpm run lint:cipassests.iife.js200)🤖 Generated with Claude Code