diff options
Diffstat (limited to 'examples/with-react-native-web/apps/web/next.config.js')
| -rw-r--r-- | examples/with-react-native-web/apps/web/next.config.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/with-react-native-web/apps/web/next.config.js b/examples/with-react-native-web/apps/web/next.config.js new file mode 100644 index 0000000..71ca107 --- /dev/null +++ b/examples/with-react-native-web/apps/web/next.config.js @@ -0,0 +1,18 @@ +module.exports = { + reactStrictMode: true, + 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; + }, +}; |
