Commit ab03f58
committed
Migrate from Webpack to Vite
Replaces Webpack with Vite 7 as the build tool.
**Build system**
- Replace `webpack.config.js` with vite.config.ts
- Update all npm scripts (`serve`, `publish`, `tauri:build-html`) to use Vite
- Remove Webpack-related dependencies (webpack, css-loader, style-loader, ts-loader, html-webpack-plugin, workbox-webpack-plugin, etc.)
- Add Vite dependencies (vite, @vitejs/plugin-react, vite-plugin-pwa, favicons)
- Add tsconfig.node.json for the Vite config file
**WASM & asset preloading**
- Custom Vite plugin injects `<link rel="preload">` tags and an inline `<script>` with `WebAssembly.compileStreaming` for the WASM file, matching Webpack's inline script behavior
- Preloads both font files (timer, FiraSans) for the preload scanner
**PWA**
- Service worker registration is now inlined via vite-plugin-pwa (`injectRegister: "inline"`)
- Service worker filename kept as `service-worker.js` for migration compatibility
- Favicon generation moved from `favicons-webpack-plugin` to the `favicons` library, run at config time
- Added support for PWA install screenshots (`screenshot-wide.png`, `screenshot-narrow.png`)
- Generated icons written to icons (gitignored)
**Code changes**
- Remove `indexDelayed.ts` — imports moved directly into `index.tsx` since Vite handles code splitting automatically
- CSS module imports changed from `import * as classes` to `import classes` (Vite default export style)
- Several `import` statements changed to `import type` for type-only imports
- Add `"ESNext"` to tsconfig lib, add `"vite/client"` types
- Nest `.segmentIconContainer` styles inside `.runEditorTable` in
`RunEditor.module.css` (this was necessary because the order of the
CSS changed).
- Safari compatibility: Babel plugin for `using` declarations
- Dev builds tolerate GitHub API failures gracefully
**Dependency updates**
- lucide-react ^0.544.0 → ^0.575.0
- eslint ^9.20.1 → ^10.0.11 parent 9816c20 commit ab03f58
File tree
47 files changed
+2312
-6362
lines changed- src
- assets
- css
- ui
- components
- Settings
- views
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
47 files changed
+2312
-6362
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | | - | |
7 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
0 commit comments