Skip to content

Commit 1fdeec8

Browse files
author
Your Name
committed
bump version to v24.1207.2239
1 parent 393f027 commit 1fdeec8

File tree

5 files changed

+53
-14
lines changed

5 files changed

+53
-14
lines changed

next.config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
import type { NextConfig } from "next";
2+
import dayjs from 'dayjs'
23

4+
process.env.NEXT_PUBLIC_BUILD_TIME = dayjs().format("YYYY-MM-DD HH:mm");
35
const nextConfig: NextConfig = {
46
/* config options here */
5-
output: "standalone"
7+
output: "standalone",
8+
async rewrites() {
9+
return [
10+
{
11+
source: '/api/:path*',
12+
destination: 'http://localhost:8000/api/:path*'
13+
}
14+
]
15+
},
616
};
717

818
export default nextConfig;

package-lock.json

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "rirh<[email protected]>"
66
},
77
"license": "./LICENSE",
8-
"version": "24.1207.2222",
8+
"version": "24.1207.2239",
99
"private": true,
1010
"scripts": {
1111
"dev": "next dev",
@@ -34,6 +34,7 @@
3434
"@types/node": "^20",
3535
"@types/react": "^19",
3636
"@types/react-dom": "^19",
37+
"dayjs": "^1.11.13",
3738
"eslint": "^8",
3839
"eslint-config-next": "15.0.4",
3940
"eslint-config-prettier": "^9.1.0",

src/app/layout.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import localFont from "next/font/local";
2-
import "./globals.css";
3-
import Providers from "@/components/providers";
4-
import pkg from "../../package.json";
1+
import localFont from 'next/font/local';
2+
import './globals.css';
3+
import Providers from '@/components/providers';
4+
import pkg from '../../package.json';
5+
import BuildInfo from '@/components/build-info';
56

67
const geistSans = localFont({
7-
src: "./fonts/GeistVF.woff",
8-
variable: "--font-geist-sans",
9-
weight: "100 900",
8+
src: './fonts/GeistVF.woff',
9+
variable: '--font-geist-sans',
10+
weight: '100 900',
1011
});
1112
const geistMono = localFont({
12-
src: "./fonts/GeistMonoVF.woff",
13-
variable: "--font-geist-mono",
14-
weight: "100 900",
13+
src: './fonts/GeistMonoVF.woff',
14+
variable: '--font-geist-mono',
15+
weight: '100 900',
1516
});
1617

1718
export default function RootLayout({
@@ -53,6 +54,7 @@ export default function RootLayout({
5354
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
5455
>
5556
<Providers> {children}</Providers>
57+
<BuildInfo />
5658
</body>
5759
</html>
5860
);

src/components/build-info.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use client';
2+
import { useEffect } from 'react';
3+
import pkg from '../../package.json';
4+
export default function Page() {
5+
useEffect(() => {
6+
const print = (key: string, value: string) =>
7+
console.log(
8+
`%c ${key} %c ${value} %c `,
9+
'background:#20232a ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
10+
'background:#61dafb ;padding: 1px; border-radius: 0 3px 3px 0; color: #20232a; font-weight: bold;',
11+
'background:transparent'
12+
);
13+
print(pkg.name, pkg.version);
14+
print('build time', `${process.env.NEXT_PUBLIC_BUILD_TIME}`);
15+
}, []);
16+
return null;
17+
}

0 commit comments

Comments
 (0)