From c87ab6da7fa8c8d1c5e81d8d71468bef51351818 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Wed, 10 May 2023 09:42:02 -0400 Subject: [PATCH] Switch to a new main entry --- kifu/kifu-pwa/src/main.ts | 11 +++++++++++ kifu/kifu-pwa/webpack.config.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 kifu/kifu-pwa/src/main.ts diff --git a/kifu/kifu-pwa/src/main.ts b/kifu/kifu-pwa/src/main.ts new file mode 100644 index 0000000..afd966a --- /dev/null +++ b/kifu/kifu-pwa/src/main.ts @@ -0,0 +1,11 @@ +import init, { CoreApp } from "kifu-wasm"; + +const main = async () => { + await init(); + let coreApi = new CoreApp(); + + let response = await coreApi.dispatch({ type: "PlayingField" }); + console.log("playing field response: ", response); +}; + +main(); diff --git a/kifu/kifu-pwa/webpack.config.js b/kifu/kifu-pwa/webpack.config.js index f7148c5..8fb82a3 100644 --- a/kifu/kifu-pwa/webpack.config.js +++ b/kifu/kifu-pwa/webpack.config.js @@ -3,7 +3,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { mode: "development", entry: { - "kifu-bundle": "./src/converter.ts", + "kifu-bundle": "./src/main.ts", sw: "./src/sw.js", }, loader: {