-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
45 lines (44 loc) · 1 KB
/
Copy pathnext.config.mjs
File metadata and controls
45 lines (44 loc) · 1 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
import { imageHosts } from './image-hosts.config.mjs';
/** @type {import('next').NextConfig} */
const nextConfig = {
productionBrowserSourceMaps: true,
distDir: process.env.DIST_DIR || '.next',
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
images: {
remotePatterns: imageHosts,
minimumCacheTTL: 60,
qualities: [75, 85, 100],
},
webpack(
config,
{
dev: dev
}
) {
config.module.rules.push({
test: /\.(jsx|tsx)$/,
exclude: [/node_modules/],
use: [{
loader: '@dhiwise/component-tagger/nextLoader',
}],
});
if (dev) {
const ignoredPaths = (process.env.WATCH_IGNORED_PATHS || '')
.split(',')
.map((p) => p.trim())
.filter(Boolean);
config.watchOptions = {
ignored: ignoredPaths.length
? ignoredPaths.map((p) => `**/${p.replace(/^\/+|\/+$/g, '')}/**`)
: undefined,
};
}
return config;
},
};
export default nextConfig;