diff --git a/lykiadb-playground/app/editor.tsx b/lykiadb-playground/app/editor.tsx index 831475f0..954d9061 100644 --- a/lykiadb-playground/app/editor.tsx +++ b/lykiadb-playground/app/editor.tsx @@ -5,6 +5,7 @@ import { highlight, languages } from 'prismjs/components/prism-core'; import 'prismjs/components/prism-clike'; import 'prismjs/components/prism-javascript'; import 'prismjs/themes/prism.css'; +import init, { parse } from "../pkg/index"; const EditorView = () => { const [code, setCode] = React.useState( @@ -16,6 +17,9 @@ const EditorView = () => { onValueChange={(code: string) => setCode(code)} highlight={ (code: string) => { + /* init().then(() => { + console.log(parse(code)); + }); */ return highlight(code, languages.js) } } diff --git a/lykiadb-playground/next.config.mjs b/lykiadb-playground/next.config.mjs index bae38101..165a0b32 100644 --- a/lykiadb-playground/next.config.mjs +++ b/lykiadb-playground/next.config.mjs @@ -15,16 +15,12 @@ const nextConfig = { syncWebAssembly: true, layers: true } - config.module.rules.push({ - test: /\.wasm$/, - type: "webassembly/async", - }) config.plugins.push(new WasmPackPlugin({ crateDirectory: resolve(__dirname, "."), watchDirectories: [ resolve(__dirname, "../lykiadb-lang/src") ], - extraArgs: "--target web" + extraArgs: "--target web --mode normal" })) return config },