Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions test-error.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const context = await browser.newContext({ ignoreHTTPSErrors: true });
const page = await context.newPage();
page.on('console', msg => console.log('BROWSER LOG:', msg.type(), msg.text()));
page.on('pageerror', err => console.log('BROWSER ERROR:', err.message));
await page.goto('https://localhost:5173', { waitUntil: 'networkidle' }).catch(e => console.log('Navigation Error:', e));
await page.waitForTimeout(3000);
await browser.close();
})();
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ function iGunWSServer() {
configureServer(server: any) {
if (!server.httpServer) return;

// Fix for Node.js 22.21.0 http2 regression with WebSockets
if (typeof server.httpServer.shouldUpgradeCallback !== 'function') {
server.httpServer.shouldUpgradeCallback = () => true;
}

const wss = new WebSocketServer({ noServer: true });
const sessions = new Map();

Expand Down Expand Up @@ -112,5 +117,8 @@ export default defineConfig({
plugins: [react(), tailwindcss(), basicSsl(), iGunWSServer()],
define: {
'__LOCAL_IP__': JSON.stringify(getLocalIp()),
},
server: {
host: true,
}
})