forked from jjunior96/dev-junior-alves-youtube
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
52 lines (47 loc) · 1.24 KB
/
next.config.mjs
File metadata and controls
52 lines (47 loc) · 1.24 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
import withPlugins from 'next-compose-plugins';
import withPWAInit from 'next-pwa';
const isDev = process.env.NODE_ENV !== 'production';
const withPWA = withPWAInit({
exclude: [
({ asset }) => {
if (
asset.name.startsWith('server/') ||
asset.name.match(
/^((app-|^)build-manifest\.json|react-loadable-manifest\.json)$/
)
) {
return true;
}
return isDev && !asset.name.startsWith('static/runtime/');
}
]
});
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
staticPageGenerationTimeout: 1000,
compiler: {
removeConsole: !isDev
},
images: {
formats: ['image/avif', 'image/webp'],
domains: [
'www.google.com',
'avatar.vercel.sh',
'faisalman.github.io',
'avatars.dicebear.com',
'res.cloudinary.com',
'pbs.twimg.com',
'd2vwwcvoksz7ty.cloudfront.net',
'lh3.googleusercontent.com',
'media.cleanshot.cloud' // only for staging purposes
]
},
eslint: {
dirs: ['pages', 'utils'] // Only run ESLint on the 'pages' and 'utils' directories during production builds (next build)
},
experimental: {
swcMinify: true
}
};
export default withPlugins([withPWA], nextConfig);