From 1ff5dc507ed9d76ccf2c92e0019e2faa99e12464 Mon Sep 17 00:00:00 2001 From: Jeldrik Hanschke Date: Tue, 17 Oct 2023 12:07:44 +0200 Subject: [PATCH 1/2] support empty rootURL with Ember CLI >= 5.0 --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index f28830e..f8a5357 100644 --- a/lib/index.js +++ b/lib/index.js @@ -48,7 +48,7 @@ module.exports = { let self = this; // maintaining `baseURL` for backwards compatibility. See: http://emberjs.com/blog/2016/04/28/baseURL.html - let baseURL = options.liveReloadBaseUrl || options.rootURL || options.baseURL; + let baseURL = options.liveReloadBaseUrl ?? options.rootURL ?? options.baseURL; if (this.parent) { let checker = new VersionChecker(this.parent); let depedency = checker.for('ember-cli'); From 39c289e20aa5bd398da6f480e416e53b2973ef9c Mon Sep 17 00:00:00 2001 From: Jeldrik Hanschke Date: Tue, 17 Oct 2023 12:31:39 +0200 Subject: [PATCH 2/2] express requires absoulte paths --- lib/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/index.js b/lib/index.js index f8a5357..0c82107 100644 --- a/lib/index.js +++ b/lib/index.js @@ -49,6 +49,12 @@ module.exports = { let self = this; // maintaining `baseURL` for backwards compatibility. See: http://emberjs.com/blog/2016/04/28/baseURL.html let baseURL = options.liveReloadBaseUrl ?? options.rootURL ?? options.baseURL; + + // express requires absolute paths + if (baseURL === '') { + baseURL = '/'; + } + if (this.parent) { let checker = new VersionChecker(this.parent); let depedency = checker.for('ember-cli');