Skip to content

Commit 3e67466

Browse files
committed
bug #1058 Fix deprecated public option failure (atesca09)
This PR was merged into the main branch. Discussion ---------- Fix deprecated public option failure The --public option used to specify which host to use in the manifest.json. That options was deprecated in favor of client.webSocketURL Fixes #1044 Commits ------- 9afe759 Use clientWebSocketUrl instead of public paramter
2 parents 8d26152 + 9afe759 commit 3e67466

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/config/parse-runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ module.exports = function(argv, cwd) {
4444
runtimeConfig.devServerHttps = argv.https;
4545
runtimeConfig.devServerKeepPublicPath = argv.keepPublicPath || false;
4646

47-
if (typeof argv.public === 'string') {
48-
runtimeConfig.devServerPublic = argv.public;
47+
if (typeof argv['client-web-socket-url'] === 'string') {
48+
runtimeConfig.devServerPublic = argv['client-web-socket-url'];
4949
}
5050

5151
runtimeConfig.devServerHost = argv.host ? argv.host : 'localhost';

test/config/parse-runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ describe('parse-runtime', () => {
9393
expect(config.devServerHttps).to.equal(true);
9494
});
9595

96-
it('dev-server command public', () => {
96+
it('dev-server command client-web-socket-url', () => {
9797
const testDir = createTestDirectory();
98-
const config = parseArgv(createArgv(['dev-server', '--public', 'https://my-domain:8080']), testDir);
98+
const config = parseArgv(createArgv(['dev-server', '--client-web-socket-url', 'https://my-domain:8080']), testDir);
9999

100100
expect(config.devServerPublic).to.equal('https://my-domain:8080');
101101
});

0 commit comments

Comments
 (0)