-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
39 lines (32 loc) · 939 Bytes
/
next.config.js
File metadata and controls
39 lines (32 loc) · 939 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
39
/* eslint-disable @typescript-eslint/no-var-requires */
const {withAxiom} = require("next-axiom")
const bundleAnalyzer = require("@next/bundle-analyzer")
const {withSentryConfig} = require("@sentry/nextjs")
const isDeploy = ["production", "preview"].includes(process.env.VERCEL_ENV)
const sentryWebpackPluginConfig = {
silent: true
}
const bundleAnalyzerConfig = {
enabled: process.env.ANALYZE === "true"
}
/** @type {import('next').NextConfig} */
const config = {
experimental: {
appDir: true
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "www.freecodecamp.org"
}
]
},
sentry: {
hideSourceMaps: true,
disableServerWebpackPlugin: !isDeploy,
disableClientWebpackPlugin: !isDeploy,
}
}
const withBundleAnalyzer = bundleAnalyzer(bundleAnalyzerConfig)
module.exports = withSentryConfig(withBundleAnalyzer(withAxiom(config)), sentryWebpackPluginConfig)