forked from acmutd/hackportal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
50 lines (43 loc) · 1.09 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
const runtimeCaching = require('next-pwa/cache');
const withFonts = require('next-fonts');
const withPWA = require('next-pwa')({
dest: 'public',
runtimeCaching,
disable: !process.env.ENABLE_PWA && process.env.NODE_ENV === 'development',
});
(module.exports = withPWA({
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
},
{
protocol: 'https',
hostname: 'firebasestorage.googleapis.com',
},
],
},
// https://sebhastian.com/javascript-unexpected-token-export/
// https://nextjs.org/docs/app/api-reference/next-config-js/transpilePackages
transpilePackages: ['@ant-design/icons-svg', 'rc-util'],
webpack(config, options) {
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader',
});
// For loading svg as React component
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
})),
withFonts({
enableSvg: true,
webpack(config, options) {
return config;
},
});