It is not possible to run games on a file:/// scheme because modern browsers have such tight security restrictions for local files that it prevents the game loading.
Just use the right exporter for the job. E.g. use the mobile app exporters for Android/iOS, the desktop exports to run locally on Windows/macOS, etc.