mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-04 22:08:13 +08:00
Replace TS relative @ import path (#1087)
Migrated the import shortcut used in Svelte from @ to @graphite for better future package compatibility Co-authored-by: Andre Roelofs <andreroelofsai@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Andre Roelofs
Keavon Chambers
parent
5c0a075313
commit
639a24d8ad
@@ -1,7 +1,7 @@
|
||||
import type WasmBindgenPackage from "@/../wasm/pkg";
|
||||
import { panicProxy } from "@/utility-functions/panic-proxy";
|
||||
import { type JsMessageType } from "@/wasm-communication/messages";
|
||||
import { createSubscriptionRouter, type SubscriptionRouter } from "@/wasm-communication/subscription-router";
|
||||
import type WasmBindgenPackage from "@graphite/../wasm/pkg";
|
||||
import { panicProxy } from "@graphite/utility-functions/panic-proxy";
|
||||
import { type JsMessageType } from "@graphite/wasm-communication/messages";
|
||||
import { createSubscriptionRouter, type SubscriptionRouter } from "@graphite/wasm-communication/subscription-router";
|
||||
|
||||
export type WasmRawInstance = typeof WasmBindgenPackage;
|
||||
export type WasmEditorInstance = InstanceType<WasmRawInstance["JsEditorHandle"]>;
|
||||
@@ -58,7 +58,7 @@ export async function initWasm(): Promise<void> {
|
||||
|
||||
// Import the WASM module JS bindings and wrap them in the panic proxy
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
wasmImport = await import("@/../wasm/pkg").then(panicProxy);
|
||||
wasmImport = await import("@graphite/../wasm/pkg").then(panicProxy);
|
||||
|
||||
// Provide a random starter seed which must occur after initializing the WASM module, since WASM can't generate its own random numbers
|
||||
const randomSeedFloat = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);
|
||||
|
||||
Reference in New Issue
Block a user