Skip to content

increase chunk fro release#16169

Merged
guillim merged 1 commit intomainfrom
increase-chunk-limit
Nov 28, 2025
Merged

increase chunk fro release#16169
guillim merged 1 commit intomainfrom
increase-chunk-limit

Conversation

@guillim
Copy link
Copy Markdown
Contributor

@guillim guillim commented Nov 28, 2025

1.12

@guillim guillim self-assigned this Nov 28, 2025
@guillim guillim requested a review from etiennejouan November 28, 2025 10:13
@guillim guillim enabled auto-merge (squash) November 28, 2025 10:13
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Nov 28, 2025

Greptile Overview

Greptile Summary

Increased the main chunk size limit from 6.1MB to 6.5MB (6.5% increase) to allow the build to pass for the 1.12 release.

  • The change directly contradicts the inline comment warning against increasing this limit without first exploring lazy loading options
  • This is the second increase in recent history (previously increased from an earlier value to 6.1MB in PR Increase main chunk size to 6.1MB #15667)
  • No explanation provided for why the chunk grew or what alternatives were considered
  • The PR title has a typo: "fro" should be "for"

Confidence Score: 3/5

  • This PR is safe to merge for unblocking the release, but represents technical debt that should be addressed
  • The change is technically safe (only increases a build configuration limit) and necessary for the 1.12 release. However, it contradicts existing guidance to use lazy loading instead of increasing limits, establishes a pattern of incrementally raising limits without addressing root causes, and lacks explanation of what caused the chunk size growth. This represents accumulating technical debt rather than a sustainable solution.
  • No files require special attention - the change is straightforward, though the approach is questionable

Important Files Changed

File Analysis

Filename Score Overview
packages/twenty-front/vite.config.ts 3/5 Increased MAIN_CHUNK_SIZE_LIMIT from 6.1MB to 6.5MB, contrary to the explicit comment warning against increasing this limit

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Build as Vite Build Process
    participant Plugin as chunk-size-limit Plugin
    participant Config as vite.config.ts
    
    Dev->>Config: Update MAIN_CHUNK_SIZE_LIMIT
    Note over Config: 6.1MB → 6.5MB
    Dev->>Build: Run build command
    Build->>Config: Load configuration
    Config-->>Build: MAIN_CHUNK_SIZE_LIMIT = 6.5MB
    Build->>Build: Bundle application
    Build->>Plugin: generateBundle()
    Plugin->>Plugin: Check each chunk size
    alt Chunk size > limit
        Plugin->>Build: error(oversized chunks)
        Build->>Dev: Build failed
    else Chunk size <= limit
        Plugin->>Build: Continue
        Build->>Dev: Build successful
    end
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 45 to +48
// Please don't increase this limit for main index chunk
// If it gets too big then find modules in the code base
// that can be loaded lazily, there are more!
const MAIN_CHUNK_SIZE_LIMIT = 6.1 * 1024 * 1024; // 6.1MB for main index chunk
const MAIN_CHUNK_SIZE_LIMIT = 6.5 * 1024 * 1024; // 6.5MB for main index chunk
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: this change directly contradicts the comment above which explicitly states "Please don't increase this limit for main index chunk". The comment suggests finding modules that can be loaded lazily instead of increasing the limit. Have you investigated lazy loading options before increasing the chunk size?

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/twenty-front/vite.config.ts
Line: 45:48

Comment:
**style:** this change directly contradicts the comment above which explicitly states "Please don't increase this limit for main index chunk". The comment suggests finding modules that can be loaded lazily instead of increasing the limit. Have you investigated lazy loading options before increasing the chunk size?

How can I resolve this? If you propose a fix, please make it concise.

@guillim guillim merged commit f2d9400 into main Nov 28, 2025
62 checks passed
@guillim guillim deleted the increase-chunk-limit branch November 28, 2025 10:23
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:10400

This environment will automatically shut down when the PR is closed or after 5 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants