mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: skeleton loading
This commit is contained in:
1 parent
6c6cf6b76d
commit
574c789233
11 files changed
+160
-84
No files matched your search
@@ -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 },
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user