-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.mjs
50 lines (41 loc) · 1.04 KB
/
next.config.mjs
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
/* eslint-disable no-process-env */
// @ts-check
import { env } from './src/env.mjs';
import withPWA from "next-pwa"
/** @type {import('next').NextConfig} */
const nextConfig = {
output: env.NODE_ENV === 'production' ? 'standalone' : undefined,
poweredByHeader: false,
swcMinify: true,
images: {
domains: ["image.tmdb.org", "api.themoviedb.org", "firebasestorage.googleapis.com"],
unoptimized: true,
},
basePath: '',
typescript: {
// Handled during CI
ignoreBuildErrors: true,
},
eslint: {
// Handled during CI
ignoreDuringBuilds: true,
},
};
/**
* @param {string} phase
* @param {{ defaultConfig: import('next').NextConfig }} options
*/
const nextConfigWithPlugins = async (phase, { defaultConfig }) => {
const withBundleAnalyzer = (await import('@next/bundle-analyzer')).default({
enabled: env.ANALYZE,
});
if (env.PWA) {
withPWA({
dest: "public",
register: true,
skipWaiting: true
})
}
return withBundleAnalyzer(nextConfig)
};
export default nextConfigWithPlugins;