From a6a780043f2cadfb5091b67f8fd117994d28bf15 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 21 Jun 2022 18:55:00 +0200 Subject: [PATCH] [core] Remove dead code --- docs/next.config.js | 104 -------------------------------------------- 1 file changed, 104 deletions(-) diff --git a/docs/next.config.js b/docs/next.config.js index f5f586c3d48534..eda00cb04cfe08 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -3,7 +3,6 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const pkg = require('../package.json'); const { findPages } = require('./src/modules/utils/find'); const { LANGUAGES, LANGUAGES_SSR } = require('./src/modules/constants'); -const FEATURE_TOGGLE = require('./src/featureToggle'); const workspaceRoot = path.join(__dirname, '../'); @@ -259,109 +258,6 @@ module.exports = { { source: `/static/x/:rest*`, destination: 'http://0.0.0.0:3001/static/x/:rest*' }, ]; }, - // For developement, adjust the redirects here (no effect on production because of `next export`) - // For production, configure at `docs/public/_redirects` (netlify) - async redirects() { - if (FEATURE_TOGGLE.enable_redirects) { - return [ - { - source: '/joy-ui/', - destination: '/joy-ui/getting-started/overview/', - permanent: false, - }, - { - source: '/styles/:path*', - destination: '/system/styles/:path*', - permanent: false, - }, - { - source: '/getting-started/:path*', - destination: '/material-ui/getting-started/:path*', - permanent: false, - }, - { - source: '/customization/:path*', - destination: '/material-ui/customization/:path*', - permanent: false, - }, - { - source: '/guides/:path*', - destination: '/material-ui/guides/:path*', - permanent: false, - }, - { - source: '/experimental-api/:path*', - destination: '/material-ui/experimental-api/:path*', - permanent: false, - }, - { - source: '/discover-more/:path*', - destination: '/material-ui/discover-more/:path*', - permanent: false, - }, - { - source: '/components/data-grid/:path*', - destination: '/x/react-data-grid/:path*', - permanent: false, - }, - { - source: '/components/:slug(icons|material-icons|about-the-lab|transitions|pickers)', - destination: '/material-ui/:slug', - permanent: false, - }, - { - source: '/components/:path(tabs|breadcrumbs)', - destination: '/material-ui/react-:path', - permanent: false, - }, - ...['checkboxes', 'switches'].map((component) => ({ - source: `/components/${component}`, - destination: `/material-ui/react-${component.replace(/es$/, '')}`, - permanent: false, - })), - ...[ - 'buttons', - 'radio-buttons', - 'selects', - 'text-fields', - 'avatars', - 'badges', - 'chips', - 'dividers', - 'lists', - 'tables', - 'tooltips', - 'dialogs', - 'snackbars', - 'cards', - 'drawers', - 'links', - 'menus', - 'steppers', - ].map((component) => ({ - source: `/components/${component}`, - destination: `/material-ui/react-${component.replace(/s$/, '')}`, - permanent: false, - })), - { - source: '/components/:path', - destination: '/material-ui/react-:path', - permanent: false, - }, - { - source: '/api/data-grid/:path*', - destination: '/x/api/data-grid/:path*', - permanent: false, - }, - { - source: '/api/:path*', - destination: '/material-ui/api/:path*', - permanent: false, - }, - ]; - } - return []; - }, // Can be turned on when https://github.com/vercel/next.js/issues/24640 is fixed optimizeFonts: false, };