mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-09-11 12:25:42 +03:00
app: fix building
This commit is contained in:
parent
bd558f4c20
commit
bb98b5411d
@ -1,10 +1,15 @@
|
||||
import { writable } from "svelte/store";
|
||||
import type { LayoutLoad } from "./$types";
|
||||
import { projects } from "$lib";
|
||||
import { building } from "$app/environment";
|
||||
import type { Project } from "$lib/projects";
|
||||
|
||||
export const ssr = false;
|
||||
export const prerender = true;
|
||||
export const csr = true;
|
||||
|
||||
export const load: LayoutLoad = () => ({
|
||||
projects: projects.store(),
|
||||
export const load: LayoutLoad = async () => ({
|
||||
// tauri apis require window reference which doesn't exist during ssr, so dynamic import here.
|
||||
projects: building
|
||||
? writable<Project[]>([])
|
||||
: (await import("$lib/projects")).store(),
|
||||
});
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { derived } from "svelte/store";
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
export const load: PageLoad = async ({ parent, params }) => {
|
||||
const { projects } = await parent();
|
||||
return {
|
||||
|
@ -12,7 +12,10 @@ const config = {
|
||||
}),
|
||||
],
|
||||
kit: {
|
||||
adapter: staticAdapter(),
|
||||
adapter: staticAdapter({
|
||||
precompress: true,
|
||||
strict: false,
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user