Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix site not loading after re-build (fixes #136)
The source of the error is that the service-worker is looking for the front-end assets (the `.css` and `.js` files) but they're not to be found in the browser cache (specifically in `CacheStorage`), and the version of the files the service-worker is looking for is not to be found on the server as well, as they've been replaced with the newer build files. This bug was introduced when the migration from Webpack to Vite happened, as then the public path of the build assets changed (from `/app.[hash].js` to `/assets/index-[hash].js`, and likewise for the CSS files); the service-worker was not updated to reflect this change. The solution would be to fix the service-worker, and also, for the time being, to not clear the `ui/dist` folder when re-building the front-end so as to keep the old assets.
- Loading branch information