diff options
| author | 2023-11-03 21:13:33 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:13:33 +0800 | |
| commit | 9f0d43fe099a95ab1516ae951dcb60a89e76a5a5 (patch) | |
| tree | 51614fe47bff8bb11028a07d4a35c34c9ff6594a /docs/next.config.js | |
| parent | 8f135707d069c900e055dae71e69909d6b9a41bb (diff) | |
| download | HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.tar.gz HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.zip | |
chore: delete useless codes
Diffstat (limited to 'docs/next.config.js')
| -rw-r--r-- | docs/next.config.js | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/docs/next.config.js b/docs/next.config.js deleted file mode 100644 index d92dbc6..0000000 --- a/docs/next.config.js +++ /dev/null @@ -1,94 +0,0 @@ -const { withSentryConfig } = require("@sentry/nextjs"); -const withNextra = require("nextra")({ - theme: "nextra-theme-docs", - themeConfig: "./theme.config.js", - unstable_flexsearch: true, - unstable_staticImage: true, -}); - -const sentryWebpackPluginOptions = { - silent: true, -}; - -const OLD_TURBOREPO_ROUTES = [ - "/docs", - "/docs/getting-started/create-new", - "/docs/getting-started/existing-monorepo", - "/docs/acknowledgements", - "/docs/faq", - "/docs/troubleshooting", -]; - -const nextConfig = withNextra({ - sentry: { - autoInstrumentServerFunctions: false, - hideSourceMaps: true, - }, - reactStrictMode: true, - experimental: { - legacyBrowsers: false, - }, - webpack: (config, { webpack }) => { - config.plugins.push( - new webpack.DefinePlugin({ - __SENTRY_DEBUG__: false, - __SENTRY_TRACING__: false, - }) - ); - - // return the modified config - return config; - }, - rewrites() { - return { - beforeFiles: [ - { - source: "/sitemap.xml", - destination: - "https://crawled-sitemap.vercel.sh/turbobuild-sitemap.xml", - }, - ], - }; - }, - async redirects() { - return [ - ...OLD_TURBOREPO_ROUTES.map((route) => ({ - source: route, - destination: `/AI${route}`, - permanent: true, - })), - { - source: "/docs/getting-started", - destination: "/AI/docs", - permanent: true, - }, - { - source: "/discord{/}?", - permanent: true, - destination: "https://discord.gg/JBe8BYJgKT", - }, - { - source: "/docs/changelog", - permanent: true, - destination: "https://github.com/retrofor/HydroRoll/releases", - }, - { - // Accidentally created, eventually removable. See below. - source: "/AI/docs/getting-started", - destination: "/AI/docs", - permanent: true, - }, - { - // This rule accidentally created a bunch of URLs. - // - // They've _never_ resolved, so _eventually_ we should be able to remove the - // redirects we added above to fix them. - source: "/docs/:path*", - permanent: true, - destination: "/AI/docs/:path*", - }, - ]; - }, -}); - -module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions); |
