mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-16 08:27:07 +00:00
9bfd1bbf0e
Move filters into a left sidebar, tighten spacing, match homepage checkboxes, fix forecast line domain/looping, and remove the redundant page subtitle. Also fix crxjs dev service worker live reload after Vite upgrade.
20 lines
552 B
TypeScript
20 lines
552 B
TypeScript
import type { Plugin } from "vite";
|
|
|
|
/**
|
|
* crxjs 2.6.x only replaces the first `__LIVE_RELOAD__` in `@crx/client-worker`,
|
|
* which crashes the service worker when the dev server reconnects.
|
|
*/
|
|
export default function fixCrxWorkerLiveReload(): Plugin {
|
|
return {
|
|
name: "fix-crx-worker-live-reload",
|
|
apply: "serve",
|
|
enforce: "post",
|
|
transform(code, id) {
|
|
if (!id.includes("@crx/client-worker") || !code.includes("__LIVE_RELOAD__")) {
|
|
return;
|
|
}
|
|
return code.replaceAll("__LIVE_RELOAD__", "true");
|
|
},
|
|
};
|
|
}
|