@lwrjs/client-modules 0.12.0-alpha.15 → 0.12.0-alpha.16
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const environment = globalThis?.LWR?.env;
|
|
1
|
+
const environment = globalThis?.LWR?.env || {};
|
|
2
|
+
export const isServer = environment && (environment.SSR === 'true' || environment.SSR === true);
|
|
2
3
|
// The baseBath from the config or set from the request (e.g. /shop)
|
|
3
4
|
export const basePath = environment && environment.basePath;
|
|
4
5
|
// The locale set from the request or the defaultLocale from the config (e.g. en-US)
|
|
@@ -6,9 +7,4 @@ export const locale = environment && environment.locale;
|
|
|
6
7
|
// Root base path for static assets (e.g. /shop/mobify/bundle/1234/site)
|
|
7
8
|
export const assetBasePath = environment && environment.assetBasePath;
|
|
8
9
|
// Base path for UI routing (e.g. /shop/en-US)
|
|
9
|
-
export const uiBasePath = environment && environment.uiBasePath;
|
|
10
|
-
// Determines if current environment is executing in SSR or CSR context.
|
|
11
|
-
// This value is dynamic and must be re-evaluated on each request
|
|
12
|
-
export const isServer = () => {
|
|
13
|
-
return globalThis?.LWR?.env && (globalThis?.LWR?.env.SSR === 'true' || globalThis?.LWR?.env.SSR === true);
|
|
14
|
-
};
|
|
10
|
+
export const uiBasePath = environment && environment.uiBasePath;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.12.0-alpha.
|
|
7
|
+
"version": "0.12.0-alpha.16",
|
|
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.21.2",
|
|
37
|
-
"@lwrjs/shared-utils": "0.12.0-alpha.
|
|
37
|
+
"@lwrjs/shared-utils": "0.12.0-alpha.16"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.12.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.12.0-alpha.16",
|
|
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",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"volta": {
|
|
70
70
|
"extends": "../../../package.json"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "4385e7e4aa6f2b1ffbeb64799675d8a3d8d7c0cd"
|
|
73
73
|
}
|