Skip to content

Commit 8dfb2db

Browse files
committed
Migrate frontend build system from Webpack to Vite
This migration modernizes the build tooling while maintaining all existing functionality: - Replace Webpack with Vite for faster builds and HMR - Update package.json: remove webpack dependencies, add vite and @vitejs/plugin-react - Create vite.config.ts with support for: - Multiple HTML entry points (taskpane, editor, logs, popup, commands) - HTTPS dev server with Office.js dev certificates - API proxy to backend at /api - Manifest.xml transformation for prod/dev - Static asset copying - Code splitting with React vendor chunk - Update all HTML entry points to include script module tags - Replace Webpack HMR with Vite HMR in index.tsx - Update tsconfig.json for Vite compatibility: - moduleResolution: bundler - target: ES2020 - isolatedModules: true - noEmit: true - Add vite-env.d.ts for Vite type definitions - Update CLAUDE.md documentation to reflect Vite build system All endpoints, build outputs, and dev server functionality remain unchanged. Build commands maintain the same interface (npm run build, npm run dev-server).
1 parent d13431c commit 8dfb2db

File tree

12 files changed

+3112
-6280
lines changed

12 files changed

+3112
-6280
lines changed

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ cd backend && uv run pytest && uv run ruff check
6767
- **State Management**: Jotai for global state
6868
- **Styling**: a mix of Tailwind CSS and CSS modules
6969
- **Authentication**: Auth0 integration
70-
- **Build Tool**: Webpack with TypeScript
71-
- **Key Entry Points**:
70+
- **Build Tool**: Vite with TypeScript
71+
- **Key Entry Points**:
7272
- `src/taskpane.html` - Main task pane interface for MS Word
7373
- `src/editor/editor.html` - Standalone editor for demo and user study
7474
- `src/editor/editor.tsx` - Document editor integration
@@ -93,7 +93,7 @@ cd backend && uv run pytest && uv run ruff check
9393
### TypeScript Configuration
9494
- Strict mode enabled with path aliases (`@/*` maps to `./src/*`)
9595
- React JSX transform configured
96-
- ES2020 modules with es5 target for IE11 compatibility (but IE is not tested so it's likely to not work)
96+
- ES2020 modules and target with bundler module resolution for Vite
9797

9898
### Python Configuration
9999
- **Type Checking**: MyPy with Pydantic plugin enabled
@@ -112,7 +112,7 @@ cd backend && uv run pytest && uv run ruff check
112112
- Use function declarations for named components, arrow functions for unnamed
113113
- TypeScript strict mode - always include proper types
114114
- React components should not explicitly import React (configured in ESLint)
115-
- Use `@/` prefix for internal imports (webpack alias)
115+
- Use `@/` prefix for internal imports (Vite alias configured in vite.config.ts)
116116
- Prefer `const` over `let`, avoid `var`
117117

118118
### Backend

0 commit comments

Comments
 (0)