wip ed wasm gzip
This commit is contained in:
parent
df73b97c2b
commit
38814dd5f1
|
|
@ -3,6 +3,7 @@ import { EdBase } from "../../nova/ed/ed-base";
|
||||||
import { EDGlobal } from "../../nova/ed/logic/ed-global";
|
import { EDGlobal } from "../../nova/ed/logic/ed-global";
|
||||||
import { edInitSync } from "../../nova/ed/logic/ed-sync";
|
import { edInitSync } from "../../nova/ed/logic/ed-sync";
|
||||||
import { Loading } from "../../utils/ui/loading";
|
import { Loading } from "../../utils/ui/loading";
|
||||||
|
import init from "wasm-gzip";
|
||||||
|
|
||||||
export default page({
|
export default page({
|
||||||
url: "/ed/:site_id/:page_id",
|
url: "/ed/:site_id/:page_id",
|
||||||
|
|
@ -12,6 +13,7 @@ export default page({
|
||||||
const w = window as any;
|
const w = window as any;
|
||||||
if (!w.Y) {
|
if (!w.Y) {
|
||||||
(async () => {
|
(async () => {
|
||||||
|
await init();
|
||||||
(window as any).Y = await import("yjs");
|
(window as any).Y = await import("yjs");
|
||||||
(window as any).syncronize = (await import("y-pojo")).syncronize;
|
(window as any).syncronize = (await import("y-pojo")).syncronize;
|
||||||
p.render();
|
p.render();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import init from "wasm-gzip";
|
|
||||||
import { ApiProxy } from "../../../base/load/api/api-proxy";
|
import { ApiProxy } from "../../../base/load/api/api-proxy";
|
||||||
import { dbProxy } from "../../../base/load/db/db-proxy";
|
import { dbProxy } from "../../../base/load/db/db-proxy";
|
||||||
import { jscript } from "../../../utils/script/jscript";
|
import { jscript } from "../../../utils/script/jscript";
|
||||||
|
|
@ -12,7 +11,6 @@ let w = window as unknown as {
|
||||||
export const edInit = async (p: PG) => {
|
export const edInit = async (p: PG) => {
|
||||||
p.status = "ready";
|
p.status = "ready";
|
||||||
|
|
||||||
await init();
|
|
||||||
jscript.init(p.render, { esbuild: false });
|
jscript.init(p.render, { esbuild: false });
|
||||||
|
|
||||||
p.script.loaded = true;
|
p.script.loaded = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue