oxen-website/next.config.js

53 lines
1.2 KiB
JavaScript
Raw Normal View History

2021-01-31 11:02:19 +01:00
/* eslint-disable @typescript-eslint/no-var-requires */
2021-01-22 03:43:42 +01:00
const withPlugins = require('next-compose-plugins');
const withFonts = require('next-fonts');
const withSvgr = require('next-svgr');
const nextConfig = {
webpack(config) {
const rules = [{}];
return {
...config,
module: {
...config.module,
rules: [...config.module.rules, ...rules],
},
node: {
fs: 'empty',
},
};
},
env: {
2021-01-31 11:02:19 +01:00
CONTENTFUL_SPACE_ID: process.env.CONTENTFUL_SPACE_ID,
CONTENTFUL_ACCESS_TOKEN: process.env.CONTENTFUL_ACCESS_TOKEN,
2021-01-22 03:43:42 +01:00
},
images: {
2021-09-02 14:42:15 +02:00
domains: ['downloads.ctfassets.net', 'images.ctfassets.net'],
},
2021-05-17 06:36:27 +02:00
async redirects() {
return [
{
source: '/blog/session-the-road-to-monetisation-and-oxen-value-capture',
destination: '/blog/session-the-road-to-monetisation',
permanent: true,
},
];
},
2021-09-03 16:10:01 +02:00
async rewrites() {
return [
{
source: '/feed',
destination: '/api/feed/rss',
},
{
// The /:slug part is a generic parameter handler to catch all other cases
source: '/feed/:slug',
destination: '/api/feed/:slug',
},
];
},
2021-01-22 03:43:42 +01:00
};
2021-02-18 05:44:53 +01:00
module.exports = withPlugins([withFonts, withSvgr], nextConfig);