some more stuff
Here’s a good ts setup using ES build for a SPA.
First, setup an NPM script that builds and watches and also serves up a directory
undefinedesbuild src/game.ts --outdir=dist
--bundle
--watch
--serve
--servedir=.
More options
--outdir the directory the files will be generated in
--bundle to bundle the code into a single file
--target=es2022 to set the target output language.