mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 14:03:33 +09:00
We wanna support other frameworks than remix. At least to support SSG we need to additionally deploy vike.dev. Here split all remix specifics into separate module. It provides the list of components (including overrides) and templates getter. Templates allow to provide multiple module per route which is essential for many frameworks like svelte and vike which do not rely on treeshaking for client/server splitting.
20 lines
561 B
TypeScript
20 lines
561 B
TypeScript
import type { WsComponentMeta } from "@webstudio-is/react-sdk";
|
|
|
|
type FrameworkComponentEntry = {
|
|
source: string;
|
|
metas: Record<string, WsComponentMeta>;
|
|
};
|
|
|
|
type FrameworkTemplateEntry = {
|
|
file: string;
|
|
template: string;
|
|
};
|
|
|
|
export type Framework = {
|
|
components: FrameworkComponentEntry[];
|
|
html: (params: { pagePath: string }) => FrameworkTemplateEntry[];
|
|
xml: (params: { pagePath: string }) => FrameworkTemplateEntry[];
|
|
redirect: (params: { pagePath: string }) => FrameworkTemplateEntry[];
|
|
defaultSitemap: () => FrameworkTemplateEntry[];
|
|
};
|