-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.js
More file actions
36 lines (34 loc) · 823 Bytes
/
next.config.js
File metadata and controls
36 lines (34 loc) · 823 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
const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV === 'production' ? false : true,
register: true,
skipWaiting: true
})
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
/**
* @type {import('next').NextConfig}
**/
const config = {
reactStrictMode: true,
swcMinify: true,
experimental: {
optimizeCss: true
},
// need to remove once test is deleted
images: {
domains: [
'images.unsplash.com',
'tinyurl.com',
'img.youtube.com',
's3.us-west-2.amazonaws.com',
'prod-files-secure.s3.us-west-2.amazonaws.com'
],
unoptimized: true
}
}
module.exports = () => {
const plugins = [withPWA, withBundleAnalyzer]
return plugins.reduce((acc, next) => next(acc), config)
}