-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathnext.config.js
43 lines (39 loc) · 921 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// allows us to read the redirects object from the ts file
require('ts-node').register({
compilerOptions: {
module: 'commonjs',
target: 'es2017',
},
})
const { redirects } = require('./src/routing/docs-structure')
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: [
'@pluralsh/design-system',
'honorable',
'honorable-theme-default',
'honorable-recipe-mapper',
],
reactStrictMode: false,
compiler: {
// https://nextjs.org/docs/advanced-features/compiler#styled-components
styledComponents: true,
emotion: true,
},
i18n: {
locales: ['en-US'],
defaultLocale: 'en-US',
},
pageExtensions: ['js', 'jsx', 'ts', 'tsx'],
webpack: (config) => {
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader',
})
return config
},
async redirects() {
return redirects
},
}
module.exports = nextConfig