Skip to content

Commit ab03f58

Browse files
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.1
1 parent 9816c20 commit ab03f58

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

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
node_modules
22
dist
3-
npm-debug.log
4-
src/livesplit_core.wasm
53
src/livesplit-core
6-
7-
test/screenshots
4+
public/icons

src/index.html renamed to index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515

1616
<body>
1717
<div id="base">
18-
<div class="initial-load">
19-
Loading...
20-
</div>
18+
<div class="initial-load">Loading...</div>
2119
</div>
20+
<script type="module" src="/src/index.tsx"></script>
2221
</body>
2322
</html>

0 commit comments

Comments
 (0)