Skip to content

Commit a42382c

Browse files
committed
fix: remove external type imports causing build failures
- remove vite pluginoption import (not available in build context) - replace astro.astrocomponent with function type signature - simplify types to avoid external dependencies
1 parent 73de6cd commit a42382c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

astro.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import sanity from "@sanity/astro";
77
import react from "@astrojs/react";
88
import { SITE } from "./src/config";
99
import { SANITY_CONFIG } from "./src/lib/sanity.config";
10-
import type { PluginOption } from "vite";
1110

1211
// https://astro.build/config
1312
export default defineConfig({
@@ -34,7 +33,7 @@ export default defineConfig({
3433
},
3534
},
3635
vite: {
37-
plugins: [tailwindcss()] as PluginOption,
36+
plugins: [tailwindcss()],
3837
optimizeDeps: {
3938
exclude: ["@resvg/resvg-js"],
4039
},

src/layouts/PostDetails.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ const {
3535
3636
// Check if it's a Sanity post (has no filePath)
3737
const isSanityPost = !post.filePath;
38-
type ContentComponent = typeof import("astro").AstroComponent;
39-
let Content: ContentComponent | undefined;
38+
let Content: ((props: Record<string, unknown>) => unknown) | undefined;
4039
let htmlContent = "";
4140
4241
if (isSanityPost) {

0 commit comments

Comments
 (0)