I created a continuous deployment workflow to deploy a game I wrote. However, it is not working because wasm-pack ignores the cargo lockfile, resulting in incompatible dependencies being pulled in. It is clear the lockfile is being ignored because when building with wasm-pack it pulls serde 1.0.115 versus the one in the lockfile v1.0.92.
You can see the incorrect serde version in the failed output here: https://github.com/GiantCowFilms/InterPlanetGame/runs/1011063024?check_suite_focus=true), the cargo lock file is here: https://github.com/GiantCowFilms/InterPlanetGame/blob/master/Cargo.lock
I attempted to fix the problem by building the crate for the wasm target before using wasm-pack with cargo build (hoping that something would get cached causing wasm-pack to obey). That build did obey the cargo lock file, but unfortunately wasm-pack also ignored the cache.
I have been unable to reproduce this problem locally (using both WSL and Windows 10). Does anyone know why wasm-pack ignores the cargo lock file and how to force it to use it. I was unable to find the relevant information in the wasm-pack documentation.