-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
38 lines (35 loc) · 816 Bytes
/
next.config.js
File metadata and controls
38 lines (35 loc) · 816 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
28
29
30
31
32
33
34
35
36
37
38
/**
* @type {import('next').NextConfig}
*/
const isProd = process.env.NODE_ENV === 'production';
// For user pages (username.github.io), no repo name is needed in the path
const repo = '';
module.exports = {
reactStrictMode: true,
swcMinify: true,
output: 'export',
eslint: {
ignoreDuringBuilds: true,
},
images: {
unoptimized: true,
},
// For username.github.io repos, basePath should be empty
basePath: '',
// For username.github.io repos, assetPrefix should be empty in production
assetPrefix: '',
distDir: 'out',
trailingSlash: true,
// Additional configuration
compiler: {
styledComponents: true,
},
webpack(config) {
// Allow SVG imports
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
};