-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
59 lines (53 loc) · 1.28 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
49
50
51
52
53
54
55
56
57
58
59
/** @type {import('next').NextConfig} */
const runtimeCaching = require('next-pwa/cache');
const { i18n } = require('./next-i18next.config');
const withPWA = require('next-pwa')({
disable: process.env.NODE_ENV === 'development',
dest: 'public',
runtimeCaching,
});
module.exports = withPWA({
experimental: {
esmExternals: false,
},
i18n,
images: {
domains: [
'via.placeholder.com',
'res.cloudinary.com',
's3.amazonaws.com',
'18.141.64.26',
'127.0.0.1',
'localhost',
'picsum.photos',
'pickbazarlaravel.s3.ap-southeast-1.amazonaws.com',
'lh3.googleusercontent.com',
],
},
webpack(config, options) {
config.module.rules.push({
test: /\.graphql$/,
exclude: /node_modules/,
use: [options.defaultLoaders.babel, { loader: 'graphql-let/loader' }],
});
config.module.rules.push({
test: /\.graphqls$/,
exclude: /node_modules/,
use: ['graphql-let/schema/loader'],
});
config.module.rules.push({
test: /\.ya?ml$/,
type: 'json',
use: 'yaml-loader',
});
return config;
},
...(process.env.APPLICATION_MODE === 'production' && {
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
}),
});