-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
36 lines (33 loc) · 880 Bytes
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
const packages = [
'react-native',
'@amzn/payments-components-react-native',
"react-native-web",
"react-native-svg",
"native-base",
]
const nextConfig = {
transpilePackages: packages,
webpack: (config) =>
Object.assign(config, {
resolve: Object.assign(config.resolve, {
alias: {
...(config.resolve.alias || {}),
// Transform all direct `react-native` imports to `react-native-web`
"react-native$": "react-native-web",
},
extensions: [
".web.ts",
".web.tsx",
".ts",
".tsx",
".web.js",
".web.jsx",
".js",
".jsx",
...config.resolve.extensions,
],
}),
}),
};
export default nextConfig;