rusackas opened a new pull request, #35946:
URL: https://github.com/apache/superset/pull/35946

   ## Summary
   
   This PR migrates our webpack build system from Babel/TypeScript to SWC 
(Speedy Web Compiler), achieving a **73% reduction in build time**.
   
   ### Build Time Improvements 🚀
   - **Before:** ~120 seconds
   - **After:** ~29 seconds (with type checking), ~16 seconds (without)
   - **Improvement:** 73% faster builds
   
   ## Changes
   
   - ✅ Replace `babel-loader` and `ts-loader` with `swc-loader` for all JS/TS 
transpilation
   - ✅ Add `@swc/plugin-emotion` for CSS-in-JS transformations  
   - ✅ Add `@swc/plugin-transform-imports` for optimized lodash imports
   - ✅ Use SWC minifier via `TerserPlugin.swcMinify` for faster production 
builds
   - ✅ Use Lightning CSS for CSS minification (Rust-based)
   - ✅ Configure `ForkTsCheckerWebpackPlugin` for optimal async type checking
   
   ## Technical Details
   
   ### SWC Configuration
   - TypeScript/JSX support with automatic React runtime
   - Emotion CSS-in-JS with source maps in dev mode
   - Lodash tree-shaking via transform-imports
   - React Fast Refresh for improved HMR
   
   ### Type Checking Strategy
   - `ForkTsCheckerWebpackPlugin` runs async in production (non-blocking)
   - Incremental compilation enabled for faster subsequent builds
   - Configured to report only errors (not warnings)
   
   ## Testing
   
   - [x] Build completes successfully
   - [x] Development server works (`npm run dev-server`)
   - [x] Production build works (`npm run build`)
   - [x] All pre-commit hooks pass
   
   ## Backward Compatibility
   
   - No changes to npm scripts or developer workflow
   - Jest still uses Babel (separate migration opportunity)
   - Documentation doesn't need updates (only references npm commands)
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to