Skip to content

Commit

Permalink
feat: jsのrequireで書き直してみた
Browse files Browse the repository at this point in the history
吉野敬太郎 authored and 吉野敬太郎 committed Sep 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 73f6c85 commit f0569bd
Showing 5 changed files with 130 additions and 4 deletions.
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -15,11 +15,11 @@ export default defineConfig({
site: "https://yukky-sandbox.dev/",
vite: {
optimizeDeps: {
exclude: ["fsevents"],
exclude: ["fsevents", "sharp"],
},
},
output: "hybrid",
adapter: cloudflare({}),
adapter: cloudflare({ functionPerRoute: true }),
build: {
inlineStylesheets: "auto",
},
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion src/pages/og/[...slug].png.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { APIContext, APIRoute } from "astro";
import { getEntry } from "astro:content";
import { getOgImage } from "./_OgImage";
import { getOgImage } from "./_OgImage2";

export const prerender = false;

2 changes: 1 addition & 1 deletion src/pages/og/_OgImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import satori from "satori";
import sharp from "sharp";
import sharp = require("sharp");

interface OgImageProps {
text: string;
126 changes: 126 additions & 0 deletions src/pages/og/_OgImage2.jsx

Large diffs are not rendered by default.

0 comments on commit f0569bd

Please sign in to comment.