-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.js
27 lines (22 loc) · 704 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const { withPlausibleProxy } = require('next-plausible');
const indexSearch = require('./plugins/search-index');
const feed = require('./plugins/feed');
const sitemap = require('./plugins/sitemap');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
swcMinify: true,
i18n: {
locales: ['en'],
defaultLocale: 'en',
},
env: {
POSTS_PRERENDER_COUNT: 5,
WORDPRESS_HOST: process.env.WORDPRESS_HOST,
WORDPRESS_GRAPHQL_ENDPOINT: process.env.WORDPRESS_GRAPHQL_ENDPOINT,
},
};
module.exports = () => {
const plugins = [withPlausibleProxy(), indexSearch, feed, sitemap];
return plugins.reduce((acc, plugin) => plugin(acc), nextConfig);
};