@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.
Files changed (2) hide show
  1. package/App.js +17 -3
  2. 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
- plugins.push(
721
- livereload(this.destPath)
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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polylith/builder",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "description": "The polylith builder",
5
5
  "main": "index.js",
6
6
  "type": "module",