Convert Rust (Wasm-Game-Of-Life style app) to single embedded html page

I was following the guide at: https://rustwasm.github.io/book/game-of-life/introduction.html

I had a lot of trouble getting it to work. Much of this had to do with the contents of the www directory not working on an ordinary web server. It needed to be served with npm run start. I read somewhere that I had to do a npm run dist, but I couldn’t find a dist script. npm run build generated the dist directory, but it was missing index.js in addition to some harder-to-solve problems. I eventually got it to work by running npm run start -- --port 4301 --host 0.0.0.0 --disable-host-check on my production server. (see http://dansted.org:4301/ )

However, what I would like to have is a simple single HTML file that I can deploy onto a “dumb” webserver. I found this guide: https://stackoverflow.com/a/51473757/3215004

I pasted my base64 wasm into that code, but loading the resulting HTML file into Firefox gave the following error: Uncaught (in promise) TypeError: import object field './j_game_of_life_bg.js' is not an Object. I think this means that something is hardcoding paths to js files into my WASM.

So, is there a way to stop my WASM depending on external js files? (or otherwise embed all the required pieces into a single HTML file?)