diff --git a/ui/src/Game.tsx b/ui/src/Game.tsx index e227d89..04b9f0b 100644 --- a/ui/src/Game.tsx +++ b/ui/src/Game.tsx @@ -7,7 +7,7 @@ import { PlayerAndScore, ScoreResult, Tray, TurnAction, TurnAdvanceResult -} from "word_grid"; +} from "../../pkg/word_grid"; import { HighlightableLetterData, LocationType, @@ -131,7 +131,7 @@ export function Game(props: { }); useEffect(() => { - const newLetterData = props.wasm.get_board_letters() as LetterData[]; + const newLetterData = props.wasm.get_board_letters() as HighlightableLetterData[]; // we need to go through and set 'highlight' field to either true or false // it will always be false if the player that just went was the AI diff --git a/ui/src/Menu.tsx b/ui/src/Menu.tsx index becb895..373a15f 100644 --- a/ui/src/Menu.tsx +++ b/ui/src/Menu.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import {useState} from "react"; -import {Difficulty, GameWasm} from 'word_grid'; +import {Difficulty, GameWasm} from '../../pkg/word_grid'; import {Settings} from "./utils"; import {Game} from "./Game"; diff --git a/ui/src/index.tsx b/ui/src/index.tsx index 68b13f3..809f67c 100644 --- a/ui/src/index.tsx +++ b/ui/src/index.tsx @@ -1,4 +1,4 @@ -import init, {GameWasm} from '../node_modules/word_grid/word_grid.js'; +import init, {GameWasm} from '../../pkg/word_grid.js'; import {Game} from "./Game"; import {createRoot} from "react-dom/client"; import * as React from "react"; diff --git a/ui/tsconfig.json b/ui/tsconfig.json index 77e01d7..7d2caef 100644 --- a/ui/tsconfig.json +++ b/ui/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "target": "ES2023", + "target": "ES2022", "jsx": "react-jsx", "lib": [ "es2023",