[READ-ONLY] One Calendar is a privacy-first calendar web app built with Next.js. It has modern security features, including e2ee, password-protected sharing, and self-destructing share links 馃搮
calendar.xyehr.cn
nextjs
722 B
30 lines
1import { execSync } from 'node:child_process'
2import { readFileSync } from 'node:fs'
3import type { NextConfig } from 'next'
4
5const packageJson = JSON.parse(readFileSync('./package.json', 'utf8'))
6
7const getGitCommit = () => {
8 try {
9 return execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).trim()
10 } catch {
11 return 'unknown'
12 }
13}
14
15const nextConfig: NextConfig = {
16 typescript: {
17 ignoreBuildErrors: true,
18 },
19 images: {
20 formats: ['image/avif', 'image/webp'],
21 minimumCacheTTL: 60 * 60 * 24,
22 },
23 env: {
24 NEXT_PUBLIC_APP_VERSION: packageJson.version,
25 NEXT_PUBLIC_GIT_COMMIT: getGitCommit(),
26 NEXT_PUBLIC_BUILD_TIME: new Date().toISOString(),
27 },
28}
29
30export default nextConfig