Skip to content

Commit 9f8d9e6

Browse files
authored
Update webpack.dev.js
1 parent 27b5903 commit 9f8d9e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

webpack.dev.js

+7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ const common = require('./webpack.common.js');
66

77
const port = 3000;
88
let publicUrl = `ws://localhost:${port}/ws`;
9+
10+
//only for github
911
if(process.env.GITPOD_WORKSPACE_URL){
1012
const [schema, host] = process.env.GITPOD_WORKSPACE_URL.split('://');
1113
publicUrl = `wss://${port}-${host}/ws`;
1214
}
1315

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+
1421
module.exports = merge(common, {
1522
mode: 'development',
1623
devtool: 'cheap-module-source-map',

0 commit comments

Comments
 (0)