create-wasm-app
create-wasm-app copied to clipboard
Tutorial issue section 4.4
Rust newbie here, Just following the tutorial and I've reached midway through section 4.4 where I've run into a weird issue. I try building the project and running npm run start, that's when I got the error message: ERROR in ./index.js 1:20 Module parse failed: Unexpected token (1:20) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
import { Universe } as wasm from "wasm-game-of-life"; | const pre = document.getElementById("game-of-life-canvas"); | const universe = Universe.new(); @ ./bootstrap.js 4:0-20
How would I fix this issue?
Omit the as wasm:
import { Universe } from "wasm-game-of-life";