build: configure multi-entry Vite build for reader

- Add reader.ts as second entry point alongside main.ts in vite.config.ts
- Set assetsDir to empty string to output chunks to /static/ root
- Remove reader-shell import from main.ts (loaded separately via reader.js)
- Update .gitignore to exclude web/static/assets/*.js chunks
- Update Bruno environment with new test IDs
This commit is contained in:
2026-04-04 18:17:03 -04:00
parent 779f34d4f5
commit 99d6c9a5d1
4 changed files with 9 additions and 8 deletions
+1
View File
@@ -20,6 +20,7 @@ package-lock.json
# Exception: Downloaded documentation dependencies
web/static/compiled-*.js
web/static/*.js
web/static/assets/*.js
# Downloaded documentation dependencies (tracked in git)
!web/static/htmx.min.js
+2 -2
View File
@@ -3,7 +3,7 @@ variables:
- name: base_url
value: http://localhost:8765
- name: media_item_id
value: 18a08a9f-4683-4250-8eec-11983753b6dc
value: 8bd13107-e1e5-4357-b893-bfc77f1e087c
- name: fake_book_id
value: 123e4567-e89b-12d3-a456-426614174000
- name: user_id
@@ -13,7 +13,7 @@ variables:
- name: note_id
value: 7710a602-g29b-61d4-c716-446655440002
- name: library_id
value: dd03d719-76c8-4398-93ec-9258d2becf85
value: 7e970863-bcd9-4559-a416-e8d7c2af92c5
- name: job_id
value: d5554991-1a13-4f60-9a70-82d19ed1abe2
- name: rating
+6 -5
View File
@@ -3,13 +3,14 @@ export default defineConfig({
build: {
outDir: "web/static",
emptyOutDir: false,
assetsDir: "",
rollupOptions: {
input: "web/src/main.ts",
input: {
main: "web/src/main.ts",
reader: "web/src/reader/reader.ts",
},
output: {
entryFileNames: "main.js",
manualChunks: () => {
return "everything";
},
entryFileNames: "[name].js",
},
},
target: "es2020",
-1
View File
@@ -27,7 +27,6 @@ import "./password_validation";
import "./profile";
import "./profile-modal";
import "./queue";
import "./reader/reader-shell";
import "./register";
import "./search";
import "./storage";