-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
28 lines (26 loc) · 1 KB
/
next.config.js
File metadata and controls
28 lines (26 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/** @type {import('next').NextConfig} */
const path = require("path");
const nextConfig = {
// Prisma must load the generated client from node_modules at runtime; bundling it
// (especially with Turbopack in dev) resolves the stub and throws "did not initialize yet".
serverExternalPackages: ["@prisma/client", "prisma"],
// Next 16: dev uses Turbopack by default; a custom `webpack` hook requires an explicit
// turbopack section so the bundler choice is intentional (see Next.js docs).
turbopack: {},
images: {
domains: ["avatars.githubusercontent.com"],
unoptimized: true,
},
reactStrictMode: true,
// Ensure Next traces/builds relative to this project (avoid wrong root when other lockfiles exist)
outputFileTracingRoot: path.join(__dirname),
// Configure path mapping for cleaner imports
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@': require('path').resolve(__dirname, 'src'),
};
return config;
},
};
module.exports = nextConfig;