forked from betterbugs/dev-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
33 lines (29 loc) · 790 Bytes
/
next.config.js
File metadata and controls
33 lines (29 loc) · 790 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 path = require('path');
const runtimeCaching = require('next-pwa/cache');
const isProduction = process.env.NEXT_ENV === 'PRODUCTION';
const basePath = isProduction ? '/development-tools' : '';
const assetPrefix = isProduction ? '/development-tools' : '';
let nextConfig = {
basePath: basePath,
assetPrefix: assetPrefix,
reactStrictMode: true,
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
env: {
NEXT_ENV: process.env.NEXT_ENV,
},
poweredByHeader: false,
images: {
domains: ['betterbug-storage.s3.amazonaws.com'],
},
};
if (process.env.NEXT_ENV !== 'local') {
const withPWA = require('next-pwa')({
dest: 'public',
runtimeCaching,
});
module.exports = withPWA(nextConfig);
} else {
module.exports = nextConfig;
}