We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27b5903 commit 9f8d9e6Copy full SHA for 9f8d9e6
webpack.dev.js
@@ -6,11 +6,18 @@ const common = require('./webpack.common.js');
6
7
const port = 3000;
8
let publicUrl = `ws://localhost:${port}/ws`;
9
+
10
+//only for github
11
if(process.env.GITPOD_WORKSPACE_URL){
12
const [schema, host] = process.env.GITPOD_WORKSPACE_URL.split('://');
13
publicUrl = `wss://${port}-${host}/ws`;
14
}
15
16
+//only for codespaces
17
+if(process.env.CODESPACE_NAME){
18
+ publicUrl = `wss://${process.env.CODESPACE_NAME}-${port}.preview.app.github.dev/ws`;
19
+}
20
21
module.exports = merge(common, {
22
mode: 'development',
23
devtool: 'cheap-module-source-map',
0 commit comments