-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
33 lines (31 loc) · 853 Bytes
/
Copy pathnext.config.js
File metadata and controls
33 lines (31 loc) · 853 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
const withPWA = require('next-pwa')({
dest: 'public'
})
const runtimeCaching = require('next-pwa/cache')
const { PHASE_PRODUCTION_BUILD, PHASE_PRODUCTION_SERVER } = require('next/constants')
const withPlugins = require('next-compose-plugins')
const withTM = require('next-transpile-modules')(['@simplewebauthn/browser']);
const nextConfig = {
experimental: {
optimizeCss:true,
esmExternals: false
},
reactStrictMode: true,
poweredByHeader: false,
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
config.resolve.fallback.net = false;
config.resolve.fallback.tls = false;
}
return config;
}
}
module.exports = withPlugins([
[withPWA, {
pwa: {
runtimeCaching
},
}, [PHASE_PRODUCTION_BUILD, PHASE_PRODUCTION_SERVER]],
[withTM]
], nextConfig)