Avoid bundling TypeScript in the production CLI - #8248
Merged
Conversation
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260804105319Caution After installing, validate the version by running |
amcaplan
approved these changes
Aug 4, 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.
Why
Oclif has an optional TypeScript loader for development and linked source plugins. Esbuild follows that reference and adds the TypeScript compiler to both production bundles, although production commands use compiled JavaScript and skip the loader.
What
Keep TypeScript external to the Shopify CLI and create-app bundles. Development can resolve the repository dev dependency. Packaged CLIs without TypeScript use the Oclif compiled-source fallback.
This reduces the Shopify CLI static bootstrap JavaScript from about 4.0 MB to 391 KB. It also reduces the create-app JavaScript bundle from 33.42 MB to 24.36 MB.
Validation