chore: vendor foliate-js
foliate-js has no npm release and no build step; upstream recommends a git submodule. Copy it instead: this repo has no submodules and already vendors pdf.js the same way under static/pdfjs, and a submodule would pull in 231 files / 13 MB of which 191 files / 12 MB is a bundled pdf.js build that Chitai does not use. Only the import closure reachable from view.js is vendored — 15 files, 584K. pdf.js is replaced by a stub that throws: view.js reaches it through a static-string dynamic import inside makeBook, which Rollup resolves at build time even though Chitai serves PDFs from static/pdfjs/web/viewer.html, and upstream's version opens with a bare `import '@pdfjs/pdf.min.mjs'` that does not resolve here. scripts/vendor-foliate.sh pins the commit and makes the next update a one-line change. fixed-layout.js needs construct-style-sheets-polyfill, so add it.
This commit is contained in:
+4
-1
@@ -1,2 +1,5 @@
|
||||
# Mark pdfjs as vendored code
|
||||
frontend/static/pdfjs/** linguist-vendored
|
||||
frontend/static/pdfjs/** linguist-vendored
|
||||
|
||||
# Mark foliate-js as vendored code
|
||||
frontend/src/lib/vendor/** linguist-vendored
|
||||
Reference in New Issue
Block a user