mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 23:05:23 +00:00
@@ -20,9 +20,7 @@ exports.sourceNodes = async ({actions}) => {
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(
|
||||
`The gatsby-source-react-error-codes plugin has failed:\n${
|
||||
error.message
|
||||
}`,
|
||||
`The gatsby-source-react-error-codes plugin has failed:\n${error.message}`,
|
||||
);
|
||||
|
||||
process.exit(1);
|
||||
|
||||
@@ -20,10 +20,12 @@ exports.onPostBuild = async ({store}) => {
|
||||
|
||||
// versions.yml structure is [{path: string, url: string, ...}, ...]
|
||||
createRedirects(
|
||||
versions.filter(version => version.path && version.url).map(version => ({
|
||||
fromPath: version.path,
|
||||
toPath: version.url,
|
||||
})),
|
||||
versions
|
||||
.filter(version => version.path && version.url)
|
||||
.map(version => ({
|
||||
fromPath: version.path,
|
||||
toPath: version.url,
|
||||
})),
|
||||
redirectsFilePath,
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user