Skip to content

Commit

Permalink
disable turbo build
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed May 24, 2024
1 parent fbd7e52 commit 6b6bc5e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
Binary file modified site/bun.lockb
Binary file not shown.
13 changes: 9 additions & 4 deletions site/components/github-stars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,16 @@ async function CommitAndStars({ url }: { url: string }) {
next: { revalidate: 86400 },
}).then((res) => res.json());
const stars = response.stargazers_count;
const commits = await fetch(response.commits_url.replace("{/sha}", ""), {
next: { revalidate: 86400 },
}).then((res) => res.json());

const commit = commits[0]
let commits = undefined;
if (response.commits_url) {
const response2 = await fetch(response.commits_url?.replace("{/sha}", ""), {
next: { revalidate: 86400 },
});
commits = await response2.json();
}

const commit = commits?.[0]
? {
sha: commits[0].sha,
date: new Date(commits[0].commit.author.date),
Expand Down
20 changes: 18 additions & 2 deletions site/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import process from "node:process";
import { withAxiom } from "next-axiom";
import { bundledLanguages } from "shiki";
import { MapWebpackPlugin } from "fumadocs-mdx/config";
import createMDX from "fumadocs-mdx/config";
import codeImport from "remark-code-import";

const cwd = process.cwd();
const rootMapPath = ".map.ts";
Expand All @@ -12,6 +14,20 @@ const wit = JSON.parse(fs.readFileSync("wit.tmLanguage.json", "utf8"));

const rootMapFile = path.resolve(cwd, rootMapPath);

const withMDX = createMDX({
mdxOptions: {
remarkPlugins: [
() =>
codeImport({
allowImportingFromOutside: true,
}),
],
rehypeCodeOptions: {
langs: [...Object.keys(bundledLanguages), wit],
},
},
});

// create the map file
new MapWebpackPlugin({ rootMapFile }).create();

Expand All @@ -20,7 +36,7 @@ const config = {
reactStrictMode: true,
pageExtensions: ["ts", "tsx"],
experimental: {
useLightningcss: true,
// useLightningcss: true,
reactCompiler: true,
// typedRoutes: true,
// serverMinification: true,
Expand Down Expand Up @@ -66,4 +82,4 @@ const config = {
},
};

export default withAxiom(config);
export default withAxiom(withMDX(config));
5 changes: 3 additions & 2 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"build": "TURBOPACK=1 TURBOPACK_BUILD=1 next build",
"build": "next build",
"dev": "next dev --turbo",
"start": "next start",
"lint": "biome check .",
Expand Down Expand Up @@ -50,5 +50,6 @@
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5"
}
},
"trustedDependencies": ["@biomejs/biome"]
}

0 comments on commit 6b6bc5e

Please sign in to comment.