From ad2505165ee5e6a265185ebabc70c304d199e9c9 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 15 Mar 2023 11:12:06 +0000 Subject: [PATCH] Patch webpack to support codespaces --- next.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/next.config.js b/next.config.js index e078c5f..3f882c5 100644 --- a/next.config.js +++ b/next.config.js @@ -15,6 +15,17 @@ const moduleExports = { experimental: { appDir: true, }, + webpack: (config) => ({ + ...config, + devServer: { + ...config.devServer, + client: { + ...config.client, + webSocketURL: "auto://0.0.0.0:0/ws" + }, + allowedHosts: process.env.CODESPACES ? [".preview.app.github.dev"] : config.devServer.allowedHosts + } + }) }; const sentryWebpackPluginOptions = {