Skip to content

Commit

Permalink
Merge pull request #174 from MiyashitaLab/feat/config_redirect
Browse files Browse the repository at this point in the history
リダイレクト設定
  • Loading branch information
HoorayTritium authored Sep 8, 2023
2 parents c5f6c7d + 0ee063a commit 61d242b
Show file tree
Hide file tree
Showing 2 changed files with 4,226 additions and 0 deletions.
9 changes: 9 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const redirects = require("./redirects.json");

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
Expand All @@ -18,6 +20,13 @@ const nextConfig = {
},
];
},
redirects: async () => {
return [...redirects].map((item) => ({
source: item.source,
destination: encodeURIComponent(item.destination),
permanent: item.permanent,
}));
},
experimental: {
scrollRestoration: true,
largePageDataBytes: 1024 * 1000, //1MB
Expand Down
Loading

0 comments on commit 61d242b

Please sign in to comment.