@lwrjs/lwc-ssr 0.8.0-alpha.4 → 0.8.0-alpha.7
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.
|
@@ -33,6 +33,8 @@ function lwcSsrViewTranformer(options, {moduleBundler}) {
|
|
|
33
33
|
return {
|
|
34
34
|
name: "ssr-lwc-transformer",
|
|
35
35
|
async link(stringBuilder, viewContext, {customElements}) {
|
|
36
|
+
import_shared_utils.logger.debug("lwcSsrViewTranformer");
|
|
37
|
+
import_shared_utils.logger.verbose("lwcSsrViewTranformer input", stringBuilder);
|
|
36
38
|
if (process.env.LOCKER === "true") {
|
|
37
39
|
return;
|
|
38
40
|
}
|
|
@@ -68,6 +70,7 @@ function lwcSsrViewTranformer(options, {moduleBundler}) {
|
|
|
68
70
|
if (Object.keys(ssrProps).length) {
|
|
69
71
|
stringBuilder.prependLeft(ssrModules[0].startOffset, `<script type="application/javascript">globalThis.LWR = globalThis.LWR || {};globalThis.LWR.${import_identity.SSR_PROPS_KEY} = ${JSON.stringify(ssrProps)};</script>`);
|
|
70
72
|
}
|
|
73
|
+
import_shared_utils.logger.verbose("lwcSsrViewTranformer response", stringBuilder);
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { kebabCaseToModuleSpecifer } from '@lwrjs/shared-utils';
|
|
1
|
+
import { kebabCaseToModuleSpecifer, logger } from '@lwrjs/shared-utils';
|
|
2
2
|
import { LWC_SSR_PREFIX, SSR_PROPS_ATTR, SSR_PROPS_KEY, getPropsId } from '../identity.js';
|
|
3
3
|
import { ssrElement } from './ssr-element.js';
|
|
4
4
|
/**
|
|
@@ -23,6 +23,8 @@ export default function lwcSsrViewTranformer(options, { moduleBundler }) {
|
|
|
23
23
|
return {
|
|
24
24
|
name: 'ssr-lwc-transformer',
|
|
25
25
|
async link(stringBuilder, viewContext, { customElements }) {
|
|
26
|
+
logger.debug('lwcSsrViewTranformer');
|
|
27
|
+
logger.verbose('lwcSsrViewTranformer input', stringBuilder);
|
|
26
28
|
// SSR currently does not support locker because the module constructor returns undefined
|
|
27
29
|
// and the call to renderComponent would fail
|
|
28
30
|
if (process.env.LOCKER === 'true') {
|
|
@@ -67,6 +69,7 @@ export default function lwcSsrViewTranformer(options, { moduleBundler }) {
|
|
|
67
69
|
// Append the script before the custom elements; it MUST appear before the AMD shim to avoid timing issues
|
|
68
70
|
stringBuilder.prependLeft(ssrModules[0].startOffset, `<script type="application/javascript">globalThis.LWR = globalThis.LWR || {};globalThis.LWR.${SSR_PROPS_KEY} = ${JSON.stringify(ssrProps)};</script>`);
|
|
69
71
|
}
|
|
72
|
+
logger.verbose('lwcSsrViewTranformer response', stringBuilder);
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.8.0-alpha.
|
|
7
|
+
"version": "0.8.0-alpha.7",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"build/**/*.d.ts"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@lwrjs/diagnostics": "0.8.0-alpha.
|
|
37
|
-
"@lwrjs/shared-utils": "0.8.0-alpha.
|
|
36
|
+
"@lwrjs/diagnostics": "0.8.0-alpha.7",
|
|
37
|
+
"@lwrjs/shared-utils": "0.8.0-alpha.7"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.8.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.8.0-alpha.7"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=14.15.4 <19"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "5ce7bdfff149ccdb761e11e6caab11abfffe2c0b"
|
|
46
46
|
}
|