-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
25 lines (23 loc) · 846 Bytes
/
Copy pathvite.config.js
File metadata and controls
25 lines (23 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { resolve } from 'node:path';
import { defineConfig } from 'vite';
// Single multi-page build for GitHub Pages: landing + both apps into one dist/.
// base:'./' => relative asset URLs, so it works under any repo sub-path
// (user.github.io/<repo>/) without hardcoding the repo name.
// Both apps are ESM (js/main*.js) and bundle normally — no static-copy needed.
const root = import.meta.dirname;
export default defineConfig({
base: './',
build: {
outDir: 'dist',
emptyOutDir: true,
rollupOptions: {
input: {
index: resolve(root, 'index.html'),
wiki: resolve(root, 'wiki.html'),
horizon: resolve(root, 'app/earth-horizon-sim/index.html'),
fed: resolve(root, 'app/fed-wabis/index.html'),
sphere: resolve(root, 'app/sphere-drop-calc/index.html'),
},
},
},
});