-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathnext.config.js
48 lines (44 loc) · 1.2 KB
/
next.config.js
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
const withOffline = require('next-offline');
const path = require('path');
const rewrites = async () => {
const ret = [];
return {
beforeFiles: ret,
};
};
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
transpilePackages: [],
reactStrictMode: true,
publicRuntimeConfig: {
apiPath: '/api/',
backendOrigin: process.env.NEXT_PUBLIC_BACKEND_URL,
},
rewrites,
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
generateSw: false,
// dontAutoRegisterSw: true,
generateInDevMode: true,
workboxOpts: {
swSrc: './serviceWorker.js',
mode: process.env.NODE_ENV,
swDest: path.resolve(__dirname, './public/service-worker.js'),
maximumFileSizeToCacheInBytes: 7 * 1024 * 1024,
include: [
_ => {
if (/^static\//.test(_.asset.name) && !/\[.*\]/.test(_.asset.name))
return /^static\//.test(_.asset.name) && !/\[.*\]/.test(_.asset.name);
},
],
},
experimental: {
proxyTimeout: 1000 * 120,
},
};
module.exports = withOffline(nextConfig);