feat: vendor all browser deps into the image (no runtime CDN) #5

Merged
jpnadas merged 1 commits from feature/vendor-frontend-deps into main 2026-07-05 10:03:06 +00:00
Owner

esm.sh's degraded storage backend served an unpinned transitive
@codemirror/view@^6.27.0 range URL as text/plain, which browsers block for
a disallowed MIME type. A failed top-level module import aborts the whole

<script type=module>, so the language/model dropdowns came up empty despite a healthy backend — and top-level version pinning can't fix a transitive range. Add a frontend/ esbuild stage (Node stage in the Dockerfile) that vendors everything into static/vendor and serve only from there: - CodeMirror (view/state/commands) bundled into one self-contained ESM file - cropperjs (+ CSS) copied from npm dist - Tesseract.js engine + wasm core + Dutch (nld) language pack; OCR assets stay lazy (fetched only when a scan runs) and fully local - Drop vim mode (@replit/codemirror-vim); keep document-level Shift-H/L Google Fonts remains the only external (degrades gracefully, not in the failing path). Bump to 0.5.0. Co-Authored-By: Claude Opus 4.8
esm.sh's degraded storage backend served an unpinned transitive @codemirror/view@^6.27.0 range URL as text/plain, which browsers block for a disallowed MIME type. A failed top-level module import aborts the whole <script type=module>, so the language/model dropdowns came up empty despite a healthy backend — and top-level version pinning can't fix a transitive range. Add a frontend/ esbuild stage (Node stage in the Dockerfile) that vendors everything into static/vendor and serve only from there: - CodeMirror (view/state/commands) bundled into one self-contained ESM file - cropperjs (+ CSS) copied from npm dist - Tesseract.js engine + wasm core + Dutch (nld) language pack; OCR assets stay lazy (fetched only when a scan runs) and fully local - Drop vim mode (@replit/codemirror-vim); keep document-level Shift-H/L Google Fonts remains the only external <link> (degrades gracefully, not in the failing path). Bump to 0.5.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jpnadas added 1 commit 2026-07-05 10:02:57 +00:00
esm.sh's degraded storage backend served an unpinned transitive
@codemirror/view@^6.27.0 range URL as text/plain, which browsers block for
a disallowed MIME type. A failed top-level module import aborts the whole
<script type=module>, so the language/model dropdowns came up empty despite
a healthy backend — and top-level version pinning can't fix a transitive
range.

Add a frontend/ esbuild stage (Node stage in the Dockerfile) that vendors
everything into static/vendor and serve only from there:
- CodeMirror (view/state/commands) bundled into one self-contained ESM file
- cropperjs (+ CSS) copied from npm dist
- Tesseract.js engine + wasm core + Dutch (nld) language pack; OCR assets
  stay lazy (fetched only when a scan runs) and fully local
- Drop vim mode (@replit/codemirror-vim); keep document-level Shift-H/L

Google Fonts remains the only external <link> (degrades gracefully, not in
the failing path). Bump to 0.5.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jpnadas merged commit 53796f3b03 into main 2026-07-05 10:03:06 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jpnadas/finrod#5
No description provided.