fix(checkout-sdk): preserve webpackIgnore for widgets CDN import - #2937
Merged
Conversation
Rolldown mangling stripped the magic comment and inlined the CDN URL, so webpack replaced checkout.widgets() with a MODULE_NOT_FOUND stub. Co-authored-by: Cursor <cursoragent@cursor.com>
lfportal
previously approved these changes
Jul 31, 2026
|
View your CI Pipeline Execution ↗ for commit 1c942c9
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Rely on minify: false as the durable fix; a dist string scrape in build is brittle and does not exercise the real webpack failure mode. Co-authored-by: Cursor <cursoragent@cursor.com>
lfportal
approved these changes
Jul 31, 2026
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.
Customer Impact
Restores
checkout.widgets()for webpack/Vite apps broken since@imtbl/checkout-sdk@2.24.0(Send drawer / all widget types fail with "Failed to load widgets script" and no network request).Summary
/* webpackIgnore: true */survives packaging.join('')so the specifier is not folded into a template-literalimport()Bundle size delta (
dist/browser/index.js)2.24.1(mangle on, broken)2.23.0(last good)minify: false)vs current latest: ~+105 KB raw / ~+15 KB gzip. vs last good: ~+46 KB raw / ~+5 KB gzip. Acceptable for an SDK that app bundlers typically minify again.
Changes
Test plan
pnpm --filter @imtbl/checkout-sdk buildwebpackIgnore: trueand does not useimport(\https://cdn.jsdelivr.net/...`)`checkout.widgets()path)