Skip to content

Commit

Permalink
fix: Working WA parsing, finally
Browse files Browse the repository at this point in the history
  • Loading branch information
can-keklik committed Jul 21, 2024
1 parent b2c5a92 commit 9264396
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions lykiadb-playground/app/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
}
}
Expand Down
6 changes: 1 addition & 5 deletions lykiadb-playground/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit 9264396

Please sign in to comment.