@lwrjs/lwc-ssr 0.10.0-alpha.2 → 0.10.0-alpha.3

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/README.md CHANGED
@@ -102,6 +102,8 @@ There are restrictions on component code for it to successfully render on the se
102
102
 
103
103
  [LWC synthetic shadow](https://www.npmjs.com/package/@lwc/synthetic-shadow) is not supported during SSR, so components must be able to run using [native shadow](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM).
104
104
 
105
+ Root components may not contain [slots](https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_components_slots), however slots may still be used in components which are not roots.
106
+
105
107
  ### Loading data during SSR
106
108
 
107
109
  Many components depend on external data and resources. LWR provides a `getPageData()` hook for developers to fetch data on the server. During SSR, LWR calls the `getPageData()` hook for each **root component**, then serializes the resulting data into the page document as either [JSON](#json) or [markup](#markup).
@@ -246,6 +248,7 @@ Examples of non-portable code and objects include:
246
248
  Isomorphic components can:
247
249
 
248
250
  - place non-portable code in a function which is not [executed during SSR](#ssr-execution), such as the `renderedCallback`.
251
+ - choose LWC APIs which are supported on both the client and server (eg: [`lwc:inner-html`](https://rfcs.lwc.dev/rfcs/lwc/0123-innerhtml-binding) over `appendChild()`).
249
252
  - guard non-portable objects so they are not accessed during SSR:
250
253
 
251
254
  ```js
@@ -18,7 +18,7 @@ interface SsrPluginOptions {
18
18
  * f) The SSRed string is used to overwrite/link each custom element (eg: "<c-app></c-app>") in the document (see "stringBuilder.overwrite")
19
19
  * g) A script containing all the serialized properties is added for hydration
20
20
  * 4. The view/page document now contains SSRed components, which will be sent to the client
21
- * 5. During bootstrap on the client, the "lwr/initSsr" module will hydrate ALL the custom elements on the page
21
+ * 5. During bootstrap on the client, the "lwr/init" module will hydrate ALL the custom elements on the page
22
22
  */
23
23
  export default function lwcSsrViewTranformer(options: SsrPluginOptions, { moduleBundler, resourceRegistry }: ProviderContext): ViewTransformPlugin;
24
24
  export {};
@@ -17,7 +17,7 @@ import { ssrElement } from './ssr-element.js';
17
17
  * f) The SSRed string is used to overwrite/link each custom element (eg: "<c-app></c-app>") in the document (see "stringBuilder.overwrite")
18
18
  * g) A script containing all the serialized properties is added for hydration
19
19
  * 4. The view/page document now contains SSRed components, which will be sent to the client
20
- * 5. During bootstrap on the client, the "lwr/initSsr" module will hydrate ALL the custom elements on the page
20
+ * 5. During bootstrap on the client, the "lwr/init" module will hydrate ALL the custom elements on the page
21
21
  */
22
22
  export default function lwcSsrViewTranformer(options, { moduleBundler, resourceRegistry }) {
23
23
  return {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.10.0-alpha.2",
7
+ "version": "0.10.0-alpha.3",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -34,15 +34,15 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@locker/near-membrane-node": "^0.12.0",
37
- "@lwrjs/diagnostics": "0.10.0-alpha.2",
38
- "@lwrjs/shared-utils": "0.10.0-alpha.2",
37
+ "@lwrjs/diagnostics": "0.10.0-alpha.3",
38
+ "@lwrjs/shared-utils": "0.10.0-alpha.3",
39
39
  "node-fetch": "^2.6.8"
40
40
  },
41
41
  "devDependencies": {
42
- "@lwrjs/types": "0.10.0-alpha.2"
42
+ "@lwrjs/types": "0.10.0-alpha.3"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=16.0.0 <20"
46
46
  },
47
- "gitHead": "592cda0637513885477829beea35a86407b342d4"
47
+ "gitHead": "e5c38c00c2ef094961b65e7dffa1ca6ee7c5f734"
48
48
  }