feat: skeleton loading

This commit is contained in:
TrèsAbhi committed 2024-06-30 19:59:32 -05:00
1 parent 6c6cf6b76d
commit 574c789233
11 files changed
+160 -84

No files matched your search

+5 -1
View File
@@ -1,8 +1,12 @@
import { Root } from 'protobufjs';
import { context } from '../blitzkit/context';
export async function lookup(proto: string) {
const name = proto.split('.')[0];
const root = await new Root().load(
`src/protos/${proto.split('.')[0]}.proto`,
context === 'server'
? `public/protos/${name}.proto`
: `/protos/${name}.proto`,
{ keepCase: true },
);