From 40adb6d20c5901fc789ca2fb59c9e6d252fabdc7 Mon Sep 17 00:00:00 2001 From: MD-REHMAN Date: Thu, 2 Dec 2021 13:18:56 +0530 Subject: [PATCH] fix: next 12 instal template fix --- docs/install-next.mdx | 41 +++++++---------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/docs/install-next.mdx b/docs/install-next.mdx index 5619d57a7..4e2a227a0 100644 --- a/docs/install-next.mdx +++ b/docs/install-next.mdx @@ -134,7 +134,7 @@ We'll need 2 more additional steps. ```bash - yarn add next-compose-plugins next-transpile-modules @expo/next-adapter -D + yarn add next-compose-plugins next-transpile-modules @expo/next-adapter next-fonts -D ``` @@ -153,49 +153,22 @@ We'll need 2 more additional steps. ```js const { withExpo } = require('@expo/next-adapter'); +const withFonts = require('next-fonts'); const withPlugins = require('next-compose-plugins'); const withTM = require('next-transpile-modules')([ + 'react-native-web', 'native-base', - 'react-native-svg', - 'react-native-safe-area-context', - '@react-aria/visually-hidden', - '@react-native-aria/button', - '@react-native-aria/checkbox', - '@react-native-aria/combobox', - '@react-native-aria/focus', - '@react-native-aria/interactions', - '@react-native-aria/listbox', - '@react-native-aria/overlays', - '@react-native-aria/radio', - '@react-native-aria/slider', - '@react-native-aria/tabs', - '@react-native-aria/utils', - '@react-stately/combobox', - '@react-stately/radio', ]); +const nextConfig = {}; + module.exports = withPlugins( [ withTM, + [withFonts, { projectRoot: __dirname }], [withExpo, { projectRoot: __dirname }], - // your plugins go here. ], - { - 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.ts', - '.web.tsx', - ...config.resolve.extensions, - ]; - return config; - }, - } + nextConfig ); ```