fix: move vite plugins into the packages that use them#16134
fix: move vite plugins into the packages that use them#16134FelixMalfait merged 3 commits intomainfrom
Conversation
Greptile OverviewGreptile SummaryThis PR improves dependency management by moving Vite plugins from the root Key changes:
Note: The PR description mentions that All affected packages already had these plugins available via root dependencies, so this refactor only reorganizes existing working code without functional changes. Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Root as Root package.json
participant Emails as twenty-emails
participant Front as twenty-front
participant UI as twenty-ui
participant Shared as twenty-shared
participant SDK as twenty-sdk
Note over Root,SDK: Before: Plugins in root package.json
Root->>Emails: ❌ vite-plugin-dts (missing)
Root->>Front: ❌ vite-plugin-checker, svgr (missing)
Root->>UI: ❌ vite-plugin-checker, dts (missing)
Root->>Shared: ✓ vite-plugin-dts (already had)
Root->>SDK: ✓ vite-plugin-dts (already had)
Note over Dev: Refactor: Move plugins to packages
Dev->>Root: Remove unused vite-plugin-cjs-interop
Dev->>Root: Remove vite-plugin-checker
Dev->>Root: Remove vite-plugin-dts
Dev->>Root: Remove vite-plugin-svgr
Dev->>Emails: Add vite-plugin-dts@3.8.1
Dev->>Front: Add vite-plugin-checker@^0.10.2
Dev->>Front: Add vite-plugin-svgr@^4.3.0
Dev->>UI: Add vite-plugin-checker@^0.10.2
Dev->>UI: Add vite-plugin-dts@3.8.1
Note over Root,SDK: After: Each package has its own plugins
Emails->>Emails: ✓ Uses vite-plugin-dts locally
Front->>Front: ✓ Uses checker & svgr locally
UI->>UI: ✓ Uses checker, dts & svgr locally
Shared->>Shared: ✓ Uses vite-plugin-dts locally
SDK->>SDK: ✓ Uses vite-plugin-dts locally
|
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:44500 This environment will automatically shut down when the PR is closed or after 5 hours. |
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 15. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
I was looking into [Dependabot Alert 107](https://github.com/twentyhq/twenty/security/dependabot/107) and figured that the alert is caused by `vite-plugin-dts`, which is a development dependency and does not make it into the production build for it to be dangerous. However, while at it, I also saw that some packages used plugins from root package.json while others had them defined in their local package.json. Therefore, I refactored to move plugins where they're required and removed a redundant package. Builds for the following succeed as intended: - twenty-ui - twenty-emails - twenty-website - twenty-front Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
I was looking into Dependabot Alert 107 and figured that the alert is caused by
vite-plugin-dts, which is a development dependency and does not make it into the production build for it to be dangerous.However, while at it, I also saw that some packages used plugins from root package.json while others had them defined in their local package.json. Therefore, I refactored to move plugins where they're required and removed a redundant package.
Builds for the following succeed as intended: