-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
60 lines (56 loc) · 1.37 KB
/
next.config.js
File metadata and controls
60 lines (56 loc) · 1.37 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require('dotenv').config();
// Simplest method to generate a single index.html
// WARNING: This has been deprecated
// https://nextjs.org/docs/pages/api-reference/config/next-config-js/exportPathMap
const exportPathMap = async () => {
return {
'/': { page: '/' }
};
};
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
exportPathMap,
basePath: process.env.NEXT_PUBLIC_DASHBOARD_BASE_PATH,
assetPrefix: process.env.NEXT_PUBLIC_DASHBOARD_BASE_PATH,
// TODO: replace instances of next/image'
// or do image optimization on build
// by utilizing a different method
images: {
unoptimized: true
},
reactStrictMode: true,
swcMinify: false,
trailingSlash: true,
experimental: {
esmExternals: true,
},
// TODO: Check if build time lowers
// as long it doesn't cause issues
outputFileTracing: false,
webpack: (config, { isServer }) => {
if (!isServer) {
return {
...config,
module: {
...config.module,
unknownContextCritical: false,
exprContextCritical: false,
},
resolve: {
...config.resolve,
fallback: {
...config.resolve.fallback,
fs: false,
tls: false,
net: false,
},
},
};
}
return {
...config,
};
},
};
module.exports = nextConfig;