系列: next.js
javascript
30 行
· 更新於 2026-02-03
next.config.js
next.js/frontend/next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
// Enable experimental features for better performance
experimental: {
appDir: true,
},
// Environment variables for the frontend
env: {
API_BASE_URL: process.env.API_BASE_URL || 'http://localhost:4000',
},
// Image optimization settings
images: {
domains: [],
},
// Redirects for better UX (commented out since we now have a home page)
// async redirects() {
// return [
// {
// source: '/',
// destination: '/questionnaire',
// permanent: false,
// },
// ];
// },
};
module.exports = nextConfig;
相關文章
next.js
javascript
更新於 2026-02-03
jest.config.js
jest.config.js — javascript source code from the next.js learning materials (next.js/backend/jest.config.js).
閱讀文章 →
next.js
typescript
更新於 2026-02-03
setup.ts
setup.ts — typescript source code from the next.js learning materials (next.js/backend/src/__tests__/setup.ts).
閱讀文章 →
next.js
typescript
更新於 2026-02-03
index.ts
index.ts — typescript source code from the next.js learning materials (next.js/backend/src/index.ts).
閱讀文章 →
next.js
typescript
更新於 2026-02-03
responses.ts
responses.ts — typescript source code from the next.js learning materials (next.js/backend/src/routes/responses.ts).
閱讀文章 →
next.js
typescript
更新於 2026-02-03
validation.ts
validation.ts — typescript source code from the next.js learning materials (next.js/backend/src/schemas/validation.ts).
閱讀文章 →
next.js
typescript
更新於 2026-02-03
seed.ts
seed.ts — typescript source code from the next.js learning materials (next.js/backend/src/scripts/seed.ts).
閱讀文章 →