Repository navigation
Fix production build and align tooling versions - #122
Merged
Merged
Conversation
When opening the project root in VSCode, this could cause conflicts. In the app, Typescript is only used for the sprite importer script.
this would fail the production build, trying to minify a 13mb (already minified) js file
✅ Deploy Preview for peaceful-raindrop-cb2462 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
jh0ker
added this pull request to stack #127
October 6, 2026 15:37
This was referenced Oct 6, 2026
✅ Deploy Preview for serene-narwhal-9b7b1c ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The production service worker precaches the library and game media from /data/assets/ for offline mode. The webpack 4 plugin that added them was disabled in the Node 16 update (bc3c6a1). A Workbox manifest transform now adds the same entries; filenames are content hashes, so they need no revision.
jh0ker
force-pushed
the
chore/build-tooling
branch
2 times, most recently
from
October 6, 2026 17:08
58ced18 to
d2e0457
Compare
jh0ker
marked this pull request as ready for review
October 7, 2026 11:41
Collaborator
|
approved! |
static/sw-helper.js relied on the global workbox object from Workbox 4's workbox-sw loader. Workbox 5's GenerateSW bundles the runtime as a module instead, so the helper threw on install and offline mode failed. src/service-worker.js now imports the Workbox modules and contains the former GenerateSW config and the helper: video requests are served from the precache with range request support (registered before the precache route, as in production), and quota errors are reported to the page. Because the router's fetch listener now runs first, the runtime assets route skips precached URLs. Otherwise it would answer them from its own, initially empty cache instead of the precache.
The settings bundle was excluded from the precache since 67854ff, while settings/index.html was still precached. Offline, /settings/ loaded the HTML but not its script, and /settings did not match any route. The page only toggles local feature flags, so precache its bundle and serve it for both paths. The sharing page shows media from /data/sharing/, which cannot work offline. Exclude its HTML so it fails like any other offline page instead of rendering blank.
jh0ker
force-pushed
the
chore/build-tooling
branch
from
October 12, 2026 15:54
d2e0457 to
7435eba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of five stacked PRs that split up
experiment/fix-local-dev-setup. This one should merge first: develop currently fails production builds.RangeError: Set maximum size exceeded, soNODE_ENV=productionbuilds on develop fail, including the PR checks and deploy workflows..nvmrc) and Yarn 1.22.22 (packageManager), and align the app's TypeScript with CDK (5.9). In the app, TypeScript is only used by the sprite importer; the version mismatch caused editor conflicts when opening the repo root.*.ts,cdk/node_modulesandcdk/cdk.outin ESLint. Without this,yarn lintcrashes on a config file insidecdk/node_modules./data/assets/) to webpack 5. The production service worker precaches these files for offline mode. The webpack 4 plugin that listed them was disabled in the Node 16 update (bc3c6a1); a WorkboxmanifestTransformsentry now adds the same files. It produces the same 158 entries as the current production manifest. The old plugin and its two dev dependencies are removed.src/service-worker.jswithInjectManifest.static/sw-helper.jsused the globalworkboxobject from Workbox 4's loader, which Workbox 5'sGenerateSWno longer provides. It threw on install, so enabling offline mode failed. The new source contains the formerGenerateSWconfig plus the helper: precached videos are served with range request support for Safari, registered before the precache route as in production, and quota errors are reported to the page. The runtimeassetsroute added in 2024 now skips precached URLs. Without that it answers them from its own, initially empty cache, because the router's fetch listener runs before the precache listener.Now that lint runs, it reports 84 existing errors in older
src/files. PR checks don't run lint, and this PR doesn't touch those files.Tested: production build,
yarn install --frozen-lockfile, and the generated precache list compared against production'ss3-manifest.