@polylith/builder 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +17 -3
- package/package.json +1 -1
package/App.js
CHANGED
|
@@ -717,9 +717,23 @@ export default class App {
|
|
|
717
717
|
];
|
|
718
718
|
|
|
719
719
|
if (this.liveReload) {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
720
|
+
let plugin;
|
|
721
|
+
|
|
722
|
+
// rollup-plugin-livereload always bases the protocol on the
|
|
723
|
+
// webpage url. This is bad, here we override it
|
|
724
|
+
if (typeof livereload === 'object') {
|
|
725
|
+
let port = this.liveReload.port || 35800;
|
|
726
|
+
let protocol = this.liveReload.https ? 'https' : 'http';
|
|
727
|
+
let hostname = liveReload.hostname ? liveReload.hostname : 'localhost';
|
|
728
|
+
let https = liveReload.https ? liveReload.https : null;
|
|
729
|
+
let url = `${protocol}://${hostname}:${port}/livereload.js?snipver=1&port=${port}`;
|
|
730
|
+
|
|
731
|
+
plugin = livereload({watch: this.destPath, https: https, clientUrl: url, port: port})
|
|
732
|
+
} else {
|
|
733
|
+
plugin = livereload(this.destPath)
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
plugins.push(plugin)
|
|
723
737
|
}
|
|
724
738
|
|
|
725
739
|
var config = {
|