From 3a327762cc03b245a06432c6ac652fc34b176ea1 Mon Sep 17 00:00:00 2001 From: "create-issue-branch[bot]" <53036503+create-issue-branch[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 06:44:07 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Chore:=20Initial=20Release?= =?UTF-8?q?=20(#4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create draft PR for #3 [skip ci] * add changeset for release * sharp sucks... moving to squoosh * Add squooshImageService to Astro Config * test * Remove squooshImageService import from astro.config.mts now that the integration is handling setting squoosh as the image service --------- Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com> Co-authored-by: Adam Matthiesen --- .changeset/tricky-fireants-look.md | 5 +++++ package/src/astro-hashnode.ts | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/tricky-fireants-look.md diff --git a/.changeset/tricky-fireants-look.md b/.changeset/tricky-fireants-look.md new file mode 100644 index 0000000..6ebe655 --- /dev/null +++ b/.changeset/tricky-fireants-look.md @@ -0,0 +1,5 @@ +--- +"@matthiesenxyz/astro-hashnode": minor +--- + +Initial Release! diff --git a/package/src/astro-hashnode.ts b/package/src/astro-hashnode.ts index db90445..2c44b21 100644 --- a/package/src/astro-hashnode.ts +++ b/package/src/astro-hashnode.ts @@ -5,6 +5,7 @@ import { optionsSchema } from "./schemas/user-config"; import c from "picocolors"; import { AstroError } from "astro/errors"; import { readFileSync } from "node:fs"; +import { squooshImageService } from "astro/config"; /** * Astro-Hashnode Integration @@ -90,7 +91,12 @@ export default defineIntegration({ "page-ssr", `import "${resolve("./styles/tailwind.css")}";` ); + + // Update Astro Config updateConfig({ + image: { + service: squooshImageService(), + }, vite: { css: { transformer: "lightningcss" }, }