forked from tbakerx/react-resume-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
58 lines (48 loc) · 1.31 KB
/
next.config.js
File metadata and controls
58 lines (48 loc) · 1.31 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
/* eslint-env node */
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
const oneOfRule = config.module.rules.find((rule) => rule.oneOf);
// Next 12 has multiple TS loaders, and we need to update all of them.
const tsRules = oneOfRule.oneOf.filter(
(rule) => rule.test && rule.test.toString().includes('tsx|ts')
);
tsRules.forEach((rule) => {
// eslint-disable-next-line no-param-reassign
rule.include = undefined;
});
return config;
},
compress: true,
generateEtags: true,
pageExtensions: ['tsx', 'mdx', 'ts'],
poweredByHeader: false,
productionBrowserSourceMaps: false,
reactStrictMode: true,
swcMinify: true,
// Good for static hosting
trailingSlash: true,
// Static export for GitHub Pages
output: 'export',
// Make next/image work with static export
images: {
unoptimized: true,
remotePatterns: [
{
protocol: 'https',
hostname: 'images.unsplash.com',
},
{
protocol: 'https',
hostname: 'source.unsplash.com',
},
],
},
// ONLY if you host under a sub-path like:
// https://your-username.github.io/your-repo
// uncomment and set these:
//
// basePath: '/your-repo-name',
// assetPrefix: '/your-repo-name',
};
module.exports = nextConfig;