34 lines
685 B
TypeScript
34 lines
685 B
TypeScript
import { resolve } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
|
|
const __dirname = fileURLToPath(new URL('.', import.meta.url))
|
|
|
|
/**
|
|
* Vite configuration for the unified Diablo II web client (`play.html`).
|
|
*/
|
|
export default defineConfig({
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 5173,
|
|
strictPort: true,
|
|
proxy: {
|
|
'/d2net': {
|
|
target: 'wss://www.laiseek.xyz',
|
|
ws: true,
|
|
changeOrigin: true,
|
|
secure: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
target: 'es2022',
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
input: {
|
|
play: resolve(__dirname, 'play.html'),
|
|
},
|
|
},
|
|
},
|
|
})
|