Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Remove dead code #33243

Merged
merged 1 commit into from Jun 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,
};