mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-11 05:16:16 +00:00
fix: server load interferes with spa
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
import {
|
||||
themeBase,
|
||||
themeColor,
|
||||
themeSuccessBase,
|
||||
} from "$lib/style/theme.server";
|
||||
import type { LayoutServerLoad } from "./$types";
|
||||
|
||||
export const load = (async () => ({
|
||||
themeSuccessBase,
|
||||
themeBase,
|
||||
themeColor,
|
||||
})) satisfies LayoutServerLoad;
|
||||
@@ -1,11 +1,14 @@
|
||||
import type { LayoutLoad } from "./$types";
|
||||
import { browser } from "$app/environment";
|
||||
import { charaFileFromUriComponent } from "$lib/share/share-url";
|
||||
import { themeBase, themeColor, themeSuccessBase } from "$lib/style/theme";
|
||||
|
||||
export const load = (async ({ url, data, fetch }) => {
|
||||
const importFile = browser && new URLSearchParams(url.search).get("import");
|
||||
return {
|
||||
...data,
|
||||
themeSuccessBase,
|
||||
themeBase,
|
||||
themeColor,
|
||||
importFile: importFile
|
||||
? await charaFileFromUriComponent(importFile, fetch)
|
||||
: undefined,
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
export const prerender = false;
|
||||
export const ssr = false;
|
||||
@@ -1,5 +1,5 @@
|
||||
// noinspection ES6PreferShortImport
|
||||
import { themeColor } from "./src/lib/style/theme.server";
|
||||
import { themeColor } from "./src/lib/style/theme";
|
||||
import { sveltekit } from "@sveltejs/kit/vite";
|
||||
import { defineConfig } from "vite";
|
||||
import { SvelteKitPWA } from "@vite-pwa/sveltekit";
|
||||
|
||||
Reference in New Issue
Block a user