From a4fefca76bbdee8a3d03f1ed43b850f652df4c09 Mon Sep 17 00:00:00 2001 From: Jared White Date: Sat, 14 May 2022 21:01:48 -0700 Subject: [PATCH] Relocate `@lit-labs/ssr` to package dependency, import the experimental hydrate module directly --- CHANGELOG.md | 4 ++++ README.md | 2 +- frontend/javascript/index.js | 1 + lib/bridgetown-lit-renderer/version.rb | 2 +- package.json | 9 +++------ 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e24c252..b27cc62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.0.0.beta3] - 2022-05-14 + +- Relocate `@lit-labs/ssr` to package dependency, import the experimental hydrate module directly + ## [2.0.0.beta1] - 2022-05-14 - Various updates to the configuration flow, enhanced helper syntax, and a more robust sidecar infra diff --git a/README.md b/README.md index 5f9e886..7287969 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Run this command to add this plugin to your site's Gemfile, along with Lit and S ```shell $ bundle add bridgetown-lit-renderer -g bridgetown_plugins -$ yarn add bridgetown-lit-renderer lit @lit-labs/ssr +$ yarn add lit bridgetown-lit-renderer ``` Create a file in `config/lit-ssr.config.js` with the following: diff --git a/frontend/javascript/index.js b/frontend/javascript/index.js index 7d5ec35..30813d4 100644 --- a/frontend/javascript/index.js +++ b/frontend/javascript/index.js @@ -2,6 +2,7 @@ import "bridgetown-lit-renderer" */ +import "lit/experimental-hydrate-support.js" import { hydrateShadowRoots } from '@webcomponents/template-shadowroot/template-shadowroot.js' class HydrateRootElement extends HTMLElement { diff --git a/lib/bridgetown-lit-renderer/version.rb b/lib/bridgetown-lit-renderer/version.rb index d87025d..99545a5 100644 --- a/lib/bridgetown-lit-renderer/version.rb +++ b/lib/bridgetown-lit-renderer/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module BridgetownLitRenderer - VERSION = "2.0.0.beta2" + VERSION = "2.0.0.beta3" end diff --git a/package.json b/package.json index f8b442c..3c83a19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bridgetown-lit-renderer", - "version": "2.0.0-beta2", + "version": "2.0.0-beta3", "main": "frontend/javascript/index.js", "exports": { ".": { @@ -28,10 +28,7 @@ "@webcomponents/template-shadowroot": "^0.1.0", "colors": "^1.4.0", "esbuild": "^0.14", - "glob": "^7.2.0" - }, - "devDependencies": { - "@lit-labs/ssr": "^2.1.0", - "lit": "^2.2.3" + "glob": "^7.2.0", + "@lit-labs/ssr": "^2.1.0" } }