-
-
Notifications
You must be signed in to change notification settings - Fork 725
Expose esbuild keepNames
and minify
options (experimental)
#2091
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
Conversation
🦋 Changeset detectedLatest commit: 613612c The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis change adds two new optional boolean properties, Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/core/src/v3/config.ts (1)
186-213
: Well-documented experimental featuresThe addition of experimental options for esbuild configuration looks good. Both
experimental_keepNames
andexperimental_minify
are clearly documented with appropriate warnings, default values, and links to esbuild documentation.Some suggestions:
- Consider providing examples of when each option might be useful in specific scenarios
- Maybe add a note about how much bundle size reduction users might expect with minification
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
references/v3-catalog/src/trigger/binaries.ts
is excluded by!references/**
references/v3-catalog/trigger.config.ts
is excluded by!references/**
📒 Files selected for processing (4)
.changeset/gold-insects-invite.md
(1 hunks).changeset/wild-mirrors-return.md
(1 hunks)packages/cli-v3/src/build/bundle.ts
(2 hunks)packages/core/src/v3/config.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: units / 🧪 Unit Tests
- GitHub Check: typecheck / typecheck
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
.changeset/gold-insects-invite.md (1)
1-7
: LGTM - Clear changelog entryThe changeset correctly identifies the affected packages and indicates this is a patch-level change, which is appropriate for an experimental feature addition.
.changeset/wild-mirrors-return.md (1)
1-7
: LGTM - Clear changelog entryThe changeset correctly identifies the affected packages and indicates this is a patch-level change, which is appropriate for an experimental feature addition.
packages/cli-v3/src/build/bundle.ts (2)
179-181
: LGTM - Properly handling experimental optionsThe variables are correctly initialized with default values matching the documentation.
191-192
: LGTM - Proper integration with esbuild optionsThe new experimental options are correctly applied to the esbuild configuration, replacing the hardcoded
minify: false
with the configurable option.Also applies to: 198-199
The
minify
option can decrease bundle sizes by up to half, if not more. It could also break a lot of stuff, hence experimental.The
keepNames
option can fix issues in frameworks like MikroORM. Unsure about potential to break things, but best to be safe.Both disabled by default.