detached 0123133

build(homepage): tidy vite output naming and chunk strategy

commit
0123133a614fa4bc9ebbf69e366e73d5539e9518
author
bamen · · 2025-09-17 05:18 UTC
parent
64dd5d6
signature
unsigned
1 file · +7 -16
M gui/vite.config.homepage.ts +7 -16
@@ -10,9 +10,9 @@ export default defineConfig({
1010 {
1111 name: 'homepage',
1212 title: 'Dumber Browser',
13- script: 'homepage.min.js',
13+ script: 'homepage.js',
1414 css: 'homepage.css',
15- filename: 'index.html', // Special case: homepage uses index.html
15+ filename: 'index.html',
1616 }
1717 ]),
1818 ],
@@ -21,29 +21,20 @@ export default defineConfig({
2121 input: resolve(__dirname, 'src/pages/homepage.ts'),
2222 output: {
2323 dir: '../assets/gui',
24- format: 'iife',
2524 entryFileNames: 'homepage.min.js',
26- name: '__dumberHomepage',
27- inlineDynamicImports: true,
28- assetFileNames: (assetInfo) => {
29- // Keep CSS as homepage.css to avoid conflicts with the main GUI
30- if (assetInfo.name?.endsWith('.css')) {
31- return 'homepage.[ext]';
32- }
33- return '[name].[ext]';
34- },
25+ chunkFileNames: '[name].js',
26+ assetFileNames: '[name].[ext]',
3527 },
3628 },
37- emptyOutDir: false, // Don't clear the directory (shared with GUI build)
29+ emptyOutDir: false,
3830 target: ['es2020', 'chrome91', 'firefox90'],
3931 minify: true,
4032 sourcemap: false,
41- cssCodeSplit: false, // Keep CSS in single file
42- assetsInlineLimit: 0, // Don't inline assets by default
33+ cssCodeSplit: true,
34+ assetsInlineLimit: 4096,
4335 },
4436 resolve: {
4537 alias: {
46- // Alias for easier imports
4738 '$lib': resolve(__dirname, 'src/lib'),
4839 '$components': resolve(__dirname, 'src/components'),
4940 },
@@ -10,9 +10,9 @@ export default defineConfig({
10 {10 {
11 name: 'homepage',11 name: 'homepage',
12 title: 'Dumber Browser',12 title: 'Dumber Browser',
13- script: 'homepage.min.js',13+ script: 'homepage.js',
14 css: 'homepage.css',14 css: 'homepage.css',
15- filename: 'index.html', // Special case: homepage uses index.html15+ filename: 'index.html',
16 }16 }
17 ]),17 ]),
18 ],18 ],
@@ -21,29 +21,20 @@ export default defineConfig({
21 input: resolve(__dirname, 'src/pages/homepage.ts'),21 input: resolve(__dirname, 'src/pages/homepage.ts'),
22 output: {22 output: {
23 dir: '../assets/gui',23 dir: '../assets/gui',
24- format: 'iife',
25 entryFileNames: 'homepage.min.js',24 entryFileNames: 'homepage.min.js',
26- name: '__dumberHomepage',25+ chunkFileNames: '[name].js',
27- inlineDynamicImports: true,26+ assetFileNames: '[name].[ext]',
28- assetFileNames: (assetInfo) => {
29- // Keep CSS as homepage.css to avoid conflicts with the main GUI
30- if (assetInfo.name?.endsWith('.css')) {
31- return 'homepage.[ext]';
32- }
33- return '[name].[ext]';
34- },
35 },27 },
36 },28 },
37- emptyOutDir: false, // Don't clear the directory (shared with GUI build)29+ emptyOutDir: false,
38 target: ['es2020', 'chrome91', 'firefox90'],30 target: ['es2020', 'chrome91', 'firefox90'],
39 minify: true,31 minify: true,
40 sourcemap: false,32 sourcemap: false,
41- cssCodeSplit: false, // Keep CSS in single file33+ cssCodeSplit: true,
42- assetsInlineLimit: 0, // Don't inline assets by default34+ assetsInlineLimit: 4096,
43 },35 },
44 resolve: {36 resolve: {
45 alias: {37 alias: {
46- // Alias for easier imports
47 '$lib': resolve(__dirname, 'src/lib'),38 '$lib': resolve(__dirname, 'src/lib'),
48 '$components': resolve(__dirname, 'src/components'),39 '$components': resolve(__dirname, 'src/components'),
49 },40 },

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close