Skip to content

Commit

Permalink
feat: add react compiler + nextconfig.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Makisuo committed Dec 14, 2024
1 parent 824abe4 commit c1ed535
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions next.config.mjs → next.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { NextConfig } from "next"

const isDev = process.argv.indexOf("dev") !== -1
const isBuild = process.argv.indexOf("build") !== -1
if (!process.env.VELITE_STARTED && (isDev || isBuild)) {
Expand All @@ -6,13 +8,13 @@ if (!process.env.VELITE_STARTED && (isDev || isBuild)) {
await build({ watch: isDev, clean: !isDev })
}

/** @type {import("next").NextConfig} */
export default {
devIndicators: {
buildActivity: false,
appIsrStatus: false,
},
experimental: {
reactCompiler: true,
optimizePackageImports: ["shiki"],
},
async redirects() {
Expand Down Expand Up @@ -104,4 +106,4 @@ export default {
},
]
},
}
} satisfies NextConfig
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"target": "es5",
"target": "ESNext",
"downlevelIteration": true,
"plugins": [
{
Expand Down

0 comments on commit c1ed535

Please # to comment.