davidzollo opened a new pull request, #10973:
URL: https://github.com/apache/seatunnel/pull/10973

   ## Purpose
   
   The `seatunnel-engine-ui` module's `node_modules` directory has grown to 
**388 MB**, with several packages either unused, miscategorised, or replaceable 
with lighter alternatives. This PR addresses the root causes.
   
   ## Changes
   
   ### 1. Remove unused direct dependencies
   - **`date-fns-tz`** (572 KB) — declared in `dependencies` but never imported 
anywhere in the source code.
   - **`date-fns`** (36 MB) — only used for a single `parse()` call in 
`detail.tsx`. Replaced with native `new Date(str.replace(' ', 'T'))`, which 
handles the `yyyy-MM-dd HH:mm:ss` format produced by the SeaTunnel backend.
   
   ### 2. Replace `@vicons/ionicons5` (33 MB) with inline SVG components
   - The package ships 2,672 files but only **4 icons** were used: 
`DesktopOutline`, `ListOutline`, `PeopleOutline`, `PersonOutline`.
   - Added `src/components/icons/index.ts` containing the four icons as 
lightweight Vue components (SVG paths copied verbatim from the original package 
source).
   - Updated `sidebar/index.tsx` to import from the local file.
   
   ### 3. Replace `sass-embedded` with `sass` in devDependencies
   - `sass-embedded` pulled in **`colorjs.io` (8 MB)** and **`rxjs` (11 MB)** 
as transitive dependencies.
   - The plain `sass` package (JavaScript implementation, same API) has no such 
transitive overhead and is fully compatible with the project's SCSS files.
   
   ### 4. Move build-time tools to `devDependencies`
   - `tailwindcss`, `postcss`, `autoprefixer` were incorrectly placed in 
`dependencies` (runtime). Moved to `devDependencies` (build-time only). This 
also enables future CI optimisation with `npm install --omit=dev`.
   
   ## Estimated savings
   
   | Change | Saved |
   |--------|-------|
   | Remove `date-fns` + `date-fns-tz` | ~36 MB |
   | Remove `@vicons/ionicons5` | ~33 MB |
   | `sass` vs `sass-embedded` chain | ~20 MB |
   | **Total** | **~90 MB** |
   
   ## Verification
   
   - `npm install` — clean install succeeds ✓
   - `npm run build-only` — Vite production build succeeds with 3,151 modules 
transformed ✓


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to