From c9fd47d49c5a76cd4489a53a6284a0d66b5d7300 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 21 Jul 2022 11:51:05 -0400 Subject: [PATCH 1/4] Make the Lit integration be compat with Vite 3.0.1 --- packages/astro/package.json | 2 +- packages/integrations/lit/src/index.ts | 8 +++----- pnpm-lock.yaml | 10 +++++----- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/packages/astro/package.json b/packages/astro/package.json index 929c74017410..bbb603282cf8 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -136,7 +136,7 @@ "strip-ansi": "^7.0.1", "supports-esm": "^1.0.0", "tsconfig-resolver": "^3.0.1", - "vite": "^3.0.0", + "vite": "^3.0.2", "yargs-parser": "^21.0.1", "zod": "^3.17.3" }, diff --git a/packages/integrations/lit/src/index.ts b/packages/integrations/lit/src/index.ts index 95db13c3d0c5..261f695d61ad 100644 --- a/packages/integrations/lit/src/index.ts +++ b/packages/integrations/lit/src/index.ts @@ -14,11 +14,9 @@ function getViteConfiguration() { }, ssr: { external: [ - 'lit-element/lit-element.js', - '@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', - '@astrojs/lit/server.js', + 'lit-element', + '@lit-labs/ssr', + '@astrojs/lit', ], }, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16775dabe199..77192523b066 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -519,7 +519,7 @@ importers: strip-ansi: ^7.0.1 supports-esm: ^1.0.0 tsconfig-resolver: ^3.0.1 - vite: ^3.0.0 + vite: ^3.0.2 yargs-parser: ^21.0.1 zod: ^3.17.3 dependencies: @@ -577,7 +577,7 @@ importers: strip-ansi: 7.0.1 supports-esm: 1.0.0 tsconfig-resolver: 3.0.1 - vite: 3.0.0_sass@1.53.0 + vite: 3.0.2_sass@1.53.0 yargs-parser: 21.0.1 zod: 3.17.3 devDependencies: @@ -15785,9 +15785,9 @@ packages: fsevents: 2.3.2 dev: false - /vite/3.0.0_sass@1.53.0: - resolution: {integrity: sha512-M7phQhY3+fRZa0H+1WzI6N+/onruwPTBTMvaj7TzgZ0v2TE+N2sdLKxJOfOv9CckDWt5C4HmyQP81xB4dwRKzA==} - engines: {node: '>=14.18.0'} + /vite/3.0.2_sass@1.53.0: + resolution: {integrity: sha512-TAqydxW/w0U5AoL5AsD9DApTvGb2iNbGs3sN4u2VdT1GFkQVUfgUldt+t08TZgi23uIauh1TUOQJALduo9GXqw==} + engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: less: '*' From bc55abb693285425352ffb418dcde7bb910b31c0 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 21 Jul 2022 11:52:35 -0400 Subject: [PATCH 2/4] Changeset --- .changeset/mighty-poets-prove.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/mighty-poets-prove.md diff --git a/.changeset/mighty-poets-prove.md b/.changeset/mighty-poets-prove.md new file mode 100644 index 000000000000..9bd49e5b696e --- /dev/null +++ b/.changeset/mighty-poets-prove.md @@ -0,0 +1,6 @@ +--- +'astro': patch +'@astrojs/lit': patch +--- + +Fixes Lit compat with Vite 3.0.1 From ceefff1ec213a7b39f86a454e65e90a3e6a164e1 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 21 Jul 2022 12:06:52 -0400 Subject: [PATCH 3/4] Pin Vite version --- packages/astro/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/package.json b/packages/astro/package.json index bbb603282cf8..ee82786b3478 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -136,7 +136,7 @@ "strip-ansi": "^7.0.1", "supports-esm": "^1.0.0", "tsconfig-resolver": "^3.0.1", - "vite": "^3.0.2", + "vite": "3.0.2", "yargs-parser": "^21.0.1", "zod": "^3.17.3" }, From e7fc92727ef73ea7ca9548dd218bc4e4113a89ef Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 21 Jul 2022 12:07:21 -0400 Subject: [PATCH 4/4] Update lockfile --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 77192523b066..85709f413bb3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -519,7 +519,7 @@ importers: strip-ansi: ^7.0.1 supports-esm: ^1.0.0 tsconfig-resolver: ^3.0.1 - vite: ^3.0.2 + vite: 3.0.2 yargs-parser: ^21.0.1 zod: ^3.17.3 dependencies: