Skip to content

Commit e4fbd6a

Browse files
author
Guillaume Chau
committed
Hotfix HMR port handling
1 parent cdb5d18 commit e4fbd6a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'akryum:vue-component-dev-server',
3-
version: '0.0.6',
3+
version: '0.0.7',
44
summary: 'Dev server for vue hot-reloading',
55
git: 'https://github.com/Akryum/meteor-vue-component',
66
documentation: 'README.md',

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ const localIpSync = Meteor.wrapAsync(cb => {
1616
})
1717
})
1818

19-
// to define full url with port (example: https://dev.example.com:8443/)
20-
const DEVURL = process.env.HMR_URL || process.env.VUE_DEV_SERVER_URL || localIpSync();
21-
2219
// to define only dev port with same url
2320
const PORT = parseInt(process.env.HMR_PORT) || parseInt(process.env.VUE_DEV_SERVER_PORT) || getMeteorPort() || 3003;
2421

22+
// to define full url with port (example: https://dev.example.com:8443) or only domain
23+
const DEVURL = process.env.HMR_URL || process.env.VUE_DEV_SERVER_URL || localIpSync();
24+
25+
2526
// Client-side config
26-
__meteor_runtime_config__.VUE_DEV_SERVER_URL = `${DEVURL}:${PORT}`;
27+
__meteor_runtime_config__.VUE_DEV_SERVER_URL = DEVURL.indexOf(':') === -1 ? `${DEVURL}:${PORT}` : DEVURL;

packages/vue-component/package.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'akryum:vue-component',
3-
version: '0.8.16',
3+
version: '0.8.17',
44
summary: 'VueJS single-file components that hot-reloads',
55
git: 'https://github.com/Akryum/meteor-vue-component',
66
documentation: 'README.md'
@@ -43,6 +43,6 @@ Package.registerBuildPlugin({
4343
Package.onUse(function(api) {
4444
api.versionsFrom('1.4.2');
4545
api.use('isobuild:compiler-plugin@1.0.0');
46-
api.use('akryum:vue-component-dev-server@0.0.6');
46+
api.use('akryum:vue-component-dev-server@0.0.7');
4747
api.use('akryum:vue-component-dev-client@0.2.9');
4848
});

0 commit comments

Comments
 (0)