Skip to content

Commit 3dfd63c

Browse files
committed
Use Meteor runtime config instead of a custom variable.
1 parent ab242b4 commit 3dfd63c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/vue-component-dev-client/client/dev-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if(!Response.prototype.setEncoding) {
8383

8484
Meteor.startup(function() {
8585
// Dev client
86-
let port = window.__hot_port__ || 3003;
86+
let port = __meteor_runtime_config__.VUE_DEV_SERVER_PORT || 3003;
8787
console.log('[HMR] Dev client port', port);
8888
let _socket = require('socket.io-client')(`${Meteor.absoluteUrl().replace(/:\d+\//gi, '')}:${port}`);
8989
window.__dev_client__ = _socket;

packages/vue-component-dev-server/server/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ function getMeteorPort() {
99
const PORT = parseInt(process.env.HMR_PORT) || parseInt(process.env.VUE_DEV_SERVER_PORT) || getMeteorPort() || 3003;
1010

1111
// Client-side config
12-
WebAppInternals.addStaticJs(`
13-
window.__hot_port__ = ${PORT};
14-
`);
12+
__meteor_runtime_config__.VUE_DEV_SERVER_PORT = PORT;

0 commit comments

Comments
 (0)