-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vidhi Kataria
authored and
Vidhi Kataria
committed
Feb 28, 2022
1 parent
eb0575b
commit 5725c55
Showing
2 changed files
with
93 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,118 +1,99 @@ | ||
const withFonts = require("next-fonts"); | ||
const { withNativebase } = require("@native-base/next-adapter"); | ||
const path = require("path"); | ||
const withMDX = require("@next/mdx")({ | ||
extension: /\.mdx?$/, | ||
}); | ||
const path = require("path"); | ||
|
||
// const { withExpo } = require("@expo/next-adapter"); | ||
const redirectsJSON = require("./redirects.json"); | ||
const withPlugins = require("next-compose-plugins"); | ||
const withTM = require("next-transpile-modules")([ | ||
"native-base", | ||
"react-native", | ||
"react-native-svg", | ||
"react-native-web", | ||
"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", | ||
"react-native-vector-icons", | ||
"@native-base/next-adapter", | ||
"@native-base/icons", | ||
// "@expo/vector-icons", | ||
// "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", | ||
]); | ||
|
||
module.exports = withPlugins([[withTM], [withFonts], [withMDX]], { | ||
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"], | ||
// 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; | ||
// }, | ||
async redirects() { | ||
return [ | ||
{ | ||
source: "/discord", | ||
destination: "https://discord.com/invite/TSgCw2UPmb", | ||
permanent: true, | ||
}, | ||
{ | ||
source: "/blogs", | ||
destination: "https://nativebase.io/blogs", | ||
permanent: true, | ||
}, | ||
...redirectsJSON, | ||
]; | ||
}, | ||
images: { | ||
domains: [ | ||
"docs.nativebase.io", | ||
"media-exp1.licdn.com", | ||
"mir-s3-cdn-cf.behance.net", | ||
"avatars.githubusercontent.com", | ||
"images.opencollective.com", | ||
"pbs.twimg.com", | ||
], | ||
}, | ||
env: { | ||
environment: process.env.ENVIRONMENT, | ||
}, | ||
webpack: (config) => { | ||
config.module.rules.push({ | ||
test: /\.ttf$/, | ||
loader: "url-loader", // or directly file-loader | ||
include: path.resolve(__dirname, "node_modules/@native-base/icons"), | ||
}); | ||
config.resolve.alias = { | ||
...(config.resolve.alias || {}), | ||
// Transform all direct `react-native` imports to `react-native-web` | ||
"react-native$": "react-native-web", | ||
"@native-base/icons": "react-native-vector-icons", | ||
}; | ||
config.resolve.extensions = [ | ||
".web.js", | ||
".web.ts", | ||
".web.tsx", | ||
...config.resolve.extensions, | ||
]; | ||
return config; | ||
}, | ||
i18n: { | ||
locales: ["en"], | ||
defaultLocale: "en", | ||
module.exports = withNativebase({ | ||
dependencies: ["@native-base/icons"], | ||
plugins: [[withMDX]], | ||
nextConfig: { | ||
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"], | ||
// 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; | ||
// }, | ||
async redirects() { | ||
return [ | ||
{ | ||
source: "/discord", | ||
destination: "https://discord.com/invite/TSgCw2UPmb", | ||
permanent: true, | ||
}, | ||
{ | ||
source: "/blogs", | ||
destination: "https://nativebase.io/blogs", | ||
permanent: true, | ||
}, | ||
...redirectsJSON, | ||
]; | ||
}, | ||
images: { | ||
domains: [ | ||
"docs.nativebase.io", | ||
"media-exp1.licdn.com", | ||
"mir-s3-cdn-cf.behance.net", | ||
"avatars.githubusercontent.com", | ||
"images.opencollective.com", | ||
"pbs.twimg.com", | ||
], | ||
}, | ||
env: { | ||
environment: process.env.ENVIRONMENT, | ||
}, | ||
webpack: (config) => { | ||
config.module.rules.push({ | ||
test: /\.ttf$/, | ||
loader: "url-loader", // or directly file-loader | ||
include: path.resolve(__dirname, "node_modules/@native-base/icons"), | ||
}); | ||
config.resolve.alias = { | ||
...(config.resolve.alias || {}), | ||
// Transform all direct `react-native` imports to `react-native-web` | ||
"react-native$": "react-native-web", | ||
// "@native-base/icons": "react-native-vector-icons", | ||
}; | ||
config.resolve.extensions = [ | ||
".web.js", | ||
".web.ts", | ||
".web.tsx", | ||
...config.resolve.extensions, | ||
]; | ||
return config; | ||
}, | ||
i18n: { | ||
locales: ["en"], | ||
defaultLocale: "en", | ||
}, | ||
// webpack: (config, options) => { | ||
// config.module.rules.push({ | ||
// test: /\.ttf$/, | ||
// loader: "url-loader", // or directly file-loader | ||
// include: path.resolve(__dirname, "node_modules/@native-base/icons"), | ||
// }); | ||
// config.resolve.alias = { | ||
// ...(config.resolve.alias || {}), | ||
// "react-native$": "react-native-web", | ||
// }; | ||
// config.resolve.extensions = [ | ||
// ".web.js", | ||
// ".web.ts", | ||
// ".web.tsx", | ||
// ...config.resolve.extensions, | ||
// ]; | ||
// return config; | ||
// }, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5725c55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
staging-docs – ./
staging-docs-git-staging-geekyants-team.vercel.app
staging-docs-geekyants-team.vercel.app
staging-docs.nativebase.io