Skip to content

Commit

Permalink
[core] Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 21, 2022
1 parent 3c52811 commit e3e3a98
Showing 1 changed file with 0 additions and 104 deletions.
104 changes: 0 additions & 104 deletions docs/next.config.js
Expand Up @@ -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, LANGUAGES_IGNORE_PAGES } = require('./src/modules/constants');
const FEATURE_TOGGLE = require('./src/featureToggle');

const workspaceRoot = path.join(__dirname, '../');

Expand Down Expand Up @@ -256,109 +255,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,
};

0 comments on commit e3e3a98

Please sign in to comment.