-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
39 lines (32 loc) · 859 Bytes
/
next.config.js
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
29
30
31
32
33
34
35
36
37
38
39
const path = require("node:path");
const { execSync } = require("node:child_process");
const withVideos = require("next-videos");
const projectRoot = __dirname;
/**
* @type {import('next').NextConfig}
*/
const config = {
output: "export",
distDir: "dist",
reactStrictMode: true,
experimental: {
// TODO: remove these once they become stable
scrollRestoration: true,
},
serverRuntimeConfig: {
// Workaround for https://github.com/vercel/next.js/issues/8251
paths: {
project: projectRoot,
articles: path.join(projectRoot, "articles"),
public: path.join(projectRoot, "public"),
},
buildInfo: {
time: Date.now(),
commitHash: execSync("git rev-parse HEAD").toString().trim(),
},
},
typescript: {
tsconfigPath: "tsconfig.next.json",
},
};
module.exports = withVideos(config);