File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed
Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 11import createBundleAnalyzer from "@next/bundle-analyzer" ;
22import { withPostHogConfig } from "@posthog/nextjs-config" ;
33import type { NextConfig } from "next" ;
4+ import { PHASE_DEVELOPMENT_SERVER , PHASE_PRODUCTION_BUILD } from "next/constants.js" ;
45
56/**
67 * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
78 * for Docker builds.
89 */
9- import "./src/env.config" ;
1010import { env } from "@/env.config" ;
1111
12- const isDev = process . argv . indexOf ( "dev" ) !== - 1 ;
13- const isBuild = process . argv . indexOf ( "build" ) !== - 1 ;
14- if ( ! process . env . VELITE_STARTED && ( isDev || isBuild ) ) {
15- process . env . VELITE_STARTED = "1" ;
16- import ( "velite" ) . then ( ( m ) => m . build ( { watch : isDev , clean : ! isDev } ) ) ;
17- }
18-
1912const withBundleAnalyzer = createBundleAnalyzer ( {
2013 enabled : process . env . ANALYZE === "true" ,
2114} ) ;
@@ -74,4 +67,13 @@ if (env.POSTHOG_API_KEY && env.POSTHOG_ENV_ID) {
7467 } ) ;
7568}
7669
77- export default nextConfig ;
70+ export default ( phase : string ) => {
71+ const isDev = phase === PHASE_DEVELOPMENT_SERVER ;
72+ const isBuild = phase === PHASE_PRODUCTION_BUILD ;
73+ if ( ! process . env . VELITE_STARTED && ( isDev || isBuild ) ) {
74+ process . env . VELITE_STARTED = "1" ;
75+ import ( "velite" ) . then ( ( m ) => m . build ( { watch : isDev , clean : ! isDev } ) ) ;
76+ }
77+
78+ return nextConfig ;
79+ } ;
Original file line number Diff line number Diff line change 11import type { Metadata , Route } from "next" ;
22import Image from "next/image" ;
3+ import Link from "next/link" ;
34import { MdArrowOutward } from "react-icons/md" ;
45import { Header } from "@/components/base/Header" ;
56import { CallToAction } from "@/components/interactive/CallToAction" ;
@@ -55,7 +56,7 @@ export default function ArtPage() {
5556 < div className = "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3" >
5657 { allArtists . map ( ( artist ) =>
5758 artist . commissions . map ( ( commission ) => (
58- < a
59+ < Link
5960 key = { `${ artist . slug } -${ commission . slug } ` }
6061 className = "relative aspect-square w-full overflow-clip rounded-md border border-white/25 transition-all hover:scale-[101%] hover:shadow-xl"
6162 href = { `/art/${ artist . slug } /${ commission . slug } ` }
@@ -93,7 +94,7 @@ export default function ArtPage() {
9394 < span className = "opacity-75" > By { artist . name } </ span >
9495 </ div >
9596 </ div >
96- </ a >
97+ </ Link >
9798 ) )
9899 ) }
99100 </ div >
Original file line number Diff line number Diff line change 4242 " **/*.cjs" ,
4343 " **/*.js" ,
4444 " .next/types/**/*.ts" ,
45- " .next/dev/types/**/*.ts"
45+ " .next/dev/types/**/*.ts" ,
46+ " .next\\ dev/types/**/*.ts"
4647 ]
4748}
You can’t perform that action at this time.
0 commit comments