diablo2-web/vite.config.ts

31 lines
992 B
TypeScript

import { defineConfig } from 'vite'
/**
* The engine is plain TypeScript with no runtime dependencies: Vite only serves
* and bundles it. Four entries: the asset inspector (`index.html`), the walkable
* scene (`walk.html`), the campaign map scene (`map.html`) and the two-player
* co-op scene (`net.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: new URL('./index.html', import.meta.url).pathname,
walk: new URL('./walk.html', import.meta.url).pathname,
map: new URL('./map.html', import.meta.url).pathname,
net: new URL('./net.html', import.meta.url).pathname,
acts: new URL('./acts.html', import.meta.url).pathname,
},
},
},
})