forked from PaintSwap/speedchecker-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
42 lines (37 loc) · 973 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
40
41
42
/** @type {import('next').NextConfig} */
/** Only needed if hosted on github pages URL: https://user.github.io/repo/
* Also uncomment the assetPrefix and basePath below
* const repo = 'repo'
* const assetPrefix = `/${repo}/`
* const basePath = `/${repo}`
*/
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
output: 'export',
// Must be unoptimized when export output is used
images: {
unoptimized: true,
},
// assetPrefix: assetPrefix,
// basePath: basePath
webpack: (config, { isServer, dev }) => {
// Enable source maps in dev
if (dev) {
config.devtool = 'eval-source-map';
}
/**
// Enable source maps in production
config.devtool = 'source-map';
for (const plugin of config.plugins) {
if (plugin.constructor.name === 'TerserPlugin') {
plugin.options.sourceMap = true;
break;
}
}
}
*/
return config;
},
};
module.exports = nextConfig;