feat: redesign match play and add broadcast tooling
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
import devtoolsJson from 'vite-plugin-devtools-json';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { defineConfig, type Plugin } from 'vitest/config';
|
||||
import { playwright } from '@vitest/browser-playwright';
|
||||
import type { Server } from 'node:http';
|
||||
import { attachSockets } from './src/lib/server/ws-attach.ts';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { sentrySvelteKit } from '@sentry/sveltekit';
|
||||
|
||||
function matchSocket(): Plugin {
|
||||
return {
|
||||
name: 'esports-match-socket',
|
||||
configureServer(server) {
|
||||
if (server.httpServer) void attachSockets(server.httpServer as Server);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Stub import-in-the-middle — its ESM loader hooks are Node-only and crash Bun.
|
||||
// Sentry's manual error tracking (sentryHandle, captureException) still works;
|
||||
// only automatic OpenTelemetry instrumentation is disabled.
|
||||
@@ -31,10 +41,12 @@ export default defineConfig({
|
||||
sentrySvelteKit({
|
||||
org: 'vash-software-vr',
|
||||
project: 'esports',
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
telemetry: false
|
||||
}),
|
||||
sveltekit(),
|
||||
devtoolsJson()
|
||||
devtoolsJson(),
|
||||
matchSocket()
|
||||
],
|
||||
ssr: {
|
||||
external: ['bun']
|
||||
@@ -45,32 +57,18 @@ export default defineConfig({
|
||||
},
|
||||
reportCompressedSize: false
|
||||
},
|
||||
server: {
|
||||
host: '127.0.0.1',
|
||||
port: 3102,
|
||||
allowedHosts: ['esports-dev.vash.software'],
|
||||
ws:
|
||||
process.env.AUTH_E2E === '1'
|
||||
? false
|
||||
: { host: 'esports-dev.vash.software', protocol: 'wss', clientPort: 443 }
|
||||
},
|
||||
test: {
|
||||
expect: { requireAssertions: true },
|
||||
projects: [
|
||||
{
|
||||
extends: './vite.config.ts',
|
||||
test: {
|
||||
name: 'client',
|
||||
browser: {
|
||||
enabled: true,
|
||||
provider: playwright(),
|
||||
instances: [{ browser: 'chromium', headless: true }]
|
||||
},
|
||||
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
|
||||
exclude: ['src/lib/server/**']
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
extends: './vite.config.ts',
|
||||
test: {
|
||||
name: 'server',
|
||||
environment: 'node',
|
||||
include: ['src/**/*.{test,spec}.{js,ts}'],
|
||||
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
|
||||
}
|
||||
}
|
||||
]
|
||||
environment: 'node',
|
||||
include: ['src/**/*.{test,spec}.{js,ts}']
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user