Redirect .html paths to legacy site

This commit is contained in:
Dan Abramov
2023-01-24 04:31:49 +00:00
parent 60d29370a6
commit d9dd87ce20
2 changed files with 5 additions and 3 deletions

View File

@@ -17,9 +17,6 @@ const nextConfig = {
env: {
SANDPACK_BARE_COMPONENTS: process.env.SANDPACK_BARE_COMPONENTS,
},
async redirects() {
return [];
},
webpack: (config, {dev, isServer, ...options}) => {
if (process.env.ANALYZE) {
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');

View File

@@ -4,6 +4,11 @@
},
"trailingSlash": false,
"redirects": [
{
"source": "/:path*(\\.html)",
"destination": "https://legacy.reactjs.org/:path*.html",
"permanent": false
},
{
"source": "/tips/controlled-input-null-value.html",
"destination": "/docs/forms.html#controlled-input-null-value",