Gets lit hydration working (#1595)

This commit is contained in:
Matthew Phillips 2021-10-19 13:34:55 -04:00 committed by Drew Powers
parent f881a03961
commit 2ac2559b5d
4 changed files with 9 additions and 8 deletions

View file

@ -0,0 +1 @@
import 'lit/experimental-hydrate-support.js';

View file

@ -1,8 +1,8 @@
export default {
name: '@astrojs/renderer-lit',
server: './server.js',
external: ['@lit-labs/ssr/lib/install-global-dom-shim.js', '@lit-labs/ssr/lib/render-lit-html.js', '@lit-labs/ssr/lib/lit-element-renderer.js'],
external: ['lit', '@lit-labs/ssr/lib/install-global-dom-shim.js', '@lit-labs/ssr/lib/render-lit-html.js', '@lit-labs/ssr/lib/lit-element-renderer.js'],
polyfills: ['./client-shim.js'],
hydrationPolyfills: ['lit/experimental-hydrate-support.js'],
knownEntrypoints: ['@astrojs/renderer-lit/client-shim.js', '@webcomponents/template-shadowroot/template-shadowroot.js'],
hydrationPolyfills: ['./hydration-support.js'],
knownEntrypoints: ['@astrojs/renderer-lit/client-shim.js', '@astrojs/renderer-lit/hydration-support.js', '@webcomponents/template-shadowroot/template-shadowroot.js'],
};

View file

@ -19,6 +19,6 @@
"dependencies": {
"@lit-labs/ssr": "^1.0.0",
"@webcomponents/template-shadowroot": "^0.1.0",
"lit": "^2.0.0"
"lit": "^2.0.2"
}
}

View file

@ -6575,10 +6575,10 @@ lit-html@^2.0.0:
dependencies:
"@types/trusted-types" "^2.0.2"
lit@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/lit/-/lit-2.0.0.tgz#7710095dc518d9858dde579e9c76b9eed71e98ba"
integrity sha512-pqi5O/wVzQ9Bn4ERRoYQlt1EAUWyY5Wv888vzpoArbtChc+zfUv1XohRqSdtQZYCogl0eHKd+MQwymg2XJfECg==
lit@^2.0.0, lit@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/lit/-/lit-2.0.2.tgz#5e6f422924e0732258629fb379556b6d23f7179c"
integrity sha512-hKA/1YaSB+P+DvKWuR2q1Xzy/iayhNrJ3aveD0OQ9CKn6wUjsdnF/7LavDOJsKP/K5jzW/kXsuduPgRvTFrFJw==
dependencies:
"@lit/reactive-element" "^1.0.0"
lit-element "^3.0.0"