From 483da89cf68d68ec792ff8721d469ed10dc14e4a Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Tue, 17 Dec 2024 12:50:51 +0100 Subject: [PATCH] Adds types for `?url&inline` & `?url&no-inline` import queries (#12758) * Add types for Vite inline/no-inline import queries * Add changeset * Remove plain `?no-inline` type * Update changeset --- .changeset/curly-snakes-shave.md | 5 +++++ packages/astro/client.d.ts | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .changeset/curly-snakes-shave.md diff --git a/.changeset/curly-snakes-shave.md b/.changeset/curly-snakes-shave.md new file mode 100644 index 0000000000..f9a9ba208b --- /dev/null +++ b/.changeset/curly-snakes-shave.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Adds types for `?url&inline` and `?url&no-inline` [import queries](https://vite.dev/guide/assets.html#explicit-inline-handling) added in Vite 6 diff --git a/packages/astro/client.d.ts b/packages/astro/client.d.ts index 0832344b4f..7463d871b1 100644 --- a/packages/astro/client.d.ts +++ b/packages/astro/client.d.ts @@ -535,3 +535,13 @@ declare module '*?inline' { const src: string; export default src; } + +declare module '*?url&inline' { + const src: string; + export default src; +} + +declare module '*?url&no-inline' { + const src: string; + export default src; +}