manifold/web/next.config.js

54 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2022-03-24 16:40:57 +00:00
const API_DOCS_URL = 'https://docs.manifold.markets/api'
const ABOUT_PAGE_URL = 'https://docs.manifold.markets/$how-to'
/** @type {import('next').NextConfig} */
module.exports = {
staticPageGenerationTimeout: 600, // e.g. stats page
reactStrictMode: true,
2022-07-19 21:20:23 +00:00
optimizeFonts: false,
2022-01-14 23:05:12 +00:00
experimental: {
scrollRestoration: true,
2022-01-14 23:05:12 +00:00
externalDir: true,
modularizeImports: {
'@heroicons/react/solid/?(((\\w*)?/?)*)': {
transform: '@heroicons/react/solid/{{ matches.[1] }}/{{member}}',
},
'@heroicons/react/outline/?(((\\w*)?/?)*)': {
transform: '@heroicons/react/outline/{{ matches.[1] }}/{{member}}',
},
lodash: {
transform: 'lodash/{{member}}',
},
},
2022-01-14 23:05:12 +00:00
},
images: {
domains: ['lh3.googleusercontent.com', 'i.imgur.com'],
},
async redirects() {
return [
{
source: '/api',
destination: API_DOCS_URL,
permanent: false,
},
{
source: '/api/v0',
destination: API_DOCS_URL,
permanent: false,
},
{
source: '/about',
destination: ABOUT_PAGE_URL,
permanent: false,
},
{
source: '/analytics',
destination: '/stats',
permanent: true,
},
]
},
}