index.ts (#931)
We introduce a new `indexDelayed.ts` file that bundles all the imports that are used in the `index.ts` file. They are not imported directly there, because we want to keep the size of the `index.html` as small as possible, so it can focus on requesting the WASM file as soon as possible. This should result in the `indexDelayed.ts` bundle containing basically all the JS. This JS bundle and the WASM file should then be requested in parallel. While it would be possible to request these all individually over in the `index.ts`, browsers don't actually like doing too many requests in parallel and it turns out that big JavaScript files actually compress better than having many small ones. The WASM file also is pretty big, so ideally we are not bottlenecked by the large JS file. If necessary, we could do some more bundle splitting for stuff that isn't used until much later, like the Markdown library.
LiveSplit One
LiveSplit One is a version of LiveSplit that uses the multiplatform livesplit-core library and web technologies like React to create a new LiveSplit experience that works on a lot of different platforms.
The web version of LiveSplit One is available here.
Build Instructions
In order to build LiveSplit One, you need to install npm and the Rust compiler. Make sure to recursively clone the repository so that all git submodules are cloned as well:
git clone --recursive
Once you have cloned the repository and set up both npm and the Rust compiler, you need to install the WebAssembly target:
rustup target add wasm32-unknown-unknown
You also need to build wasm-bindgen:
cargo install wasm-bindgen-cli
You need to set up some npm modules before compiling the project:
npm install -f
You are now ready to build livesplit-core, which powers LiveSplit One:
npm run build:core
Now you can build and host LiveSplit One:
npm run start
A browser tab with LiveSplit One should now open. Alternatively, you can use npm run serve to just host it without opening a browser tab.