mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 15:38:13 +08:00
Split up Wasm binaries so Cloudflare deployments stay below 25 MB per file
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
import type { MessageName, SubscriptionsRouter } from "/src/subscriptions-router";
|
||||
import { loadDemoArtwork } from "/src/utility-functions/network";
|
||||
import { operatingSystem } from "/src/utility-functions/platform";
|
||||
import init, { EditorWrapper, receiveNativeMessage } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
import { initWasm } from "/src/utility-functions/wasm-loader";
|
||||
import { EditorWrapper, receiveNativeMessage } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
import type { FrontendMessage } from "/wrapper/pkg/graphite_wasm_wrapper";
|
||||
|
||||
let subscriptions: SubscriptionsRouter | undefined = undefined;
|
||||
@@ -13,7 +14,7 @@
|
||||
|
||||
onMount(async () => {
|
||||
// Initialize the editor wrapper
|
||||
const wrapper = await init();
|
||||
const wrapper = await initWasm();
|
||||
for (const [name, f] of Object.entries(wrapper)) {
|
||||
if (name.startsWith("__node_registry")) f();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user