-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
27 lines (23 loc) · 776 Bytes
/
Copy pathnext.config.ts
File metadata and controls
27 lines (23 loc) · 776 Bytes
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
import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
const withNextIntl = createNextIntlPlugin("./src/lib/i18n/request.ts");
const nextConfig: NextConfig = {
output: "export",
reactCompiler: true,
trailingSlash: true,
images: { unoptimized: true },
basePath: basePath || undefined,
assetPrefix: basePath || undefined,
outputFileTracingRoot: __dirname,
// pdf.js optionally imports node-canvas. Next 16 builds with Turbopack
// by default and refuses a webpack() hook, so alias it here instead.
turbopack: {
resolveAlias: {
canvas: {
browser: "./src/lib/empty-module.ts",
},
},
},
};
export default withNextIntl(nextConfig);