35 lines
997 B
TypeScript
35 lines
997 B
TypeScript
import { resolve } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
|
|
const __dirname = fileURLToPath(new URL('.', import.meta.url))
|
|
|
|
/**
|
|
* The engine is plain TypeScript with no runtime dependencies: Vite only serves
|
|
* and bundles it. Main campaign entries (`index.html`, `acts.html`, `acts-zh.html`,
|
|
* `acts-en.html`, `bnet.html`). `samples/` is served in dev so all of them can
|
|
* be smoke-tested over HTTP (`?sample=samples/spawn.mpq`,
|
|
* `?data=samples/fixtures`).
|
|
*/
|
|
export default defineConfig({
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 5173,
|
|
strictPort: true,
|
|
},
|
|
build: {
|
|
target: 'es2022',
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve(__dirname, 'index.html'),
|
|
acts: resolve(__dirname, 'acts.html'),
|
|
'acts-zh': resolve(__dirname, 'acts-zh.html'),
|
|
'acts-en': resolve(__dirname, 'acts-en.html'),
|
|
bnet: resolve(__dirname, 'bnet.html'),
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|