-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
next.config.js
38 lines (35 loc) · 1.12 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
const withFonts = require('next-fonts');
const withImages = require('next-images');
const nextTM = require('next-transpile-modules');
// https://github.com/vercel/next.js/discussions/18029#discussioncomment-234977
const withTM = nextTM(['@shootismoke/ui']);
module.exports = {
images: {
// https://github.com/vercel/next.js/blob/master/errors/next-image-unconfigured-host.md
domains: ['m.media-amazon.com', 'live.staticflickr.com'],
// https://stackoverflow.com/questions/68008498/nextjs-typeerror-unsupported-file-type-undefined-after-update-to-v-11
disableStaticImages: true
},
...withTM(
withFonts(
withImages({
// https://github.com/vercel/next.js/blob/master/examples/with-react-native-web/next.config.js
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
// Transform all direct `react-native` imports to `react-native-web`
'react-native$': 'react-native-web',
};
config.resolve.extensions = [
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
...config.resolve.extensions,
];
return config;
},
})
)
),
};