@lwrjs/client-modules 0.13.3 → 0.13.5

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.
@@ -57,7 +57,7 @@ async function waitForSuccessfulPing(socketUrl) {
57
57
  }
58
58
  }
59
59
 
60
- export function initHMR(serverURI = '', metadata) {
60
+ export function initHMR(serverURI = '', metadata, hmrPolling = true) {
61
61
  const normalizedMeta = { ...{ assetReferences: [], templates: [] }, ...metadata };
62
62
  // {apiVersion}/hmr/{format}/{compat}?debug
63
63
  const host = serverURI.startsWith('/') ? location.host : '';
@@ -70,10 +70,12 @@ export function initHMR(serverURI = '', metadata) {
70
70
  return;
71
71
  }
72
72
 
73
- // Otherwise wait until the server comes back online and reload the page.
74
- console.log('Lost connection with server, start polling...');
75
- await waitForSuccessfulPing(socketUrl);
76
- location.reload();
73
+ if (hmrPolling) {
74
+ // Otherwise wait until the server comes back online and reload the page.
75
+ console.log('Lost connection with server, start polling...');
76
+ await waitForSuccessfulPing(socketUrl);
77
+ location.reload();
78
+ }
77
79
  });
78
80
 
79
81
  socket.addEventListener('message', async ({ data }) => {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.13.3",
7
+ "version": "0.13.5",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -34,10 +34,10 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@locker/sandbox": "0.22.5",
37
- "@lwrjs/shared-utils": "0.13.3"
37
+ "@lwrjs/shared-utils": "0.13.5"
38
38
  },
39
39
  "devDependencies": {
40
- "@lwrjs/types": "0.13.3",
40
+ "@lwrjs/types": "0.13.5",
41
41
  "@rollup/plugin-node-resolve": "^15.2.3",
42
42
  "@rollup/plugin-sucrase": "^5.0.2",
43
43
  "@rollup/plugin-terser": "^0.4.4",
@@ -70,5 +70,5 @@
70
70
  "volta": {
71
71
  "extends": "../../../package.json"
72
72
  },
73
- "gitHead": "adaedf286df20aed374d9eb07eaf74668084073c"
73
+ "gitHead": "8a0b773b7ed0e017f3fa29f1e918e0c0e31bd74f"
74
74
  }