/
next.config.js
42 lines (41 loc) · 1.02 KB
/
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
const { register } = require('esbuild-register/dist/node');
const { withGuildDocs } = require('@guild-docs/server');
const { i18n } = require('./next-i18next.config');
register({ extensions: ['.ts', '.tsx'] });
const { getRoutes } = require('./routes.ts');
module.exports = withGuildDocs({
i18n,
getRoutes,
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
// Todo: remove it before merge to master
ignoreBuildErrors: true,
},
webpack(config) {
config.resolve.fallback = {
...config.resolve.fallback,
module: false, // Fix error - Module not found: Can't resolve 'module'
fs: false,
repl: false,
console: false,
};
return config;
},
swcMinify: false,
async redirects() {
return [
{
source: '/docs/presets/:presetName',
destination: '/plugins/:presetName-preset',
permanent: true,
},
{
source: '/docs/plugins/:pluginName',
destination: '/plugins/:pluginName',
permanent: true,
}
];
},
});