diff --git a/packages/renderers/renderer-lit/hydration-support.js b/packages/renderers/renderer-lit/hydration-support.js new file mode 100644 index 000000000..a7508a6c1 --- /dev/null +++ b/packages/renderers/renderer-lit/hydration-support.js @@ -0,0 +1 @@ +import 'lit/experimental-hydrate-support.js'; \ No newline at end of file diff --git a/packages/renderers/renderer-lit/index.js b/packages/renderers/renderer-lit/index.js index ed22952e1..e6092305c 100644 --- a/packages/renderers/renderer-lit/index.js +++ b/packages/renderers/renderer-lit/index.js @@ -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'], }; diff --git a/packages/renderers/renderer-lit/package.json b/packages/renderers/renderer-lit/package.json index 02fd911f0..92c7cc869 100644 --- a/packages/renderers/renderer-lit/package.json +++ b/packages/renderers/renderer-lit/package.json @@ -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" } } diff --git a/yarn.lock b/yarn.lock index 726e51f95..18685b839 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"