-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.js
71 lines (68 loc) · 1.46 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// @ts-check
/**
* @type {import('next').NextConfig}
**/
const config = {
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
experimental: {
mdxRs: true,
outputFileTracingIncludes: {
'/': ['posts/**/*', './posts/**/*.mdx'],
},
esmExternals: 'loose',
},
typescript: {
ignoreBuildErrors: true,
},
env: {
SITE_URL: 'https://nullpt.rs',
},
webpack: config => {
config.module.rules.push({
test: /\.const.ts/,
use: [{loader: 'const-module-loader'}],
});
return config;
},
async redirects() {
return [
{
source: '/feed.json',
destination: '/api/feed.json',
permanent: true,
},
{
source: '/feed.atom',
destination: '/api/feed.atom',
permanent: true,
},
{
source: '/feed.rss',
destination: '/api/feed.rss',
permanent: true,
},
{
source: '/reverse-engineering-malicious-bots',
destination: 'https://old.nullpt.rs/reverse-engineering-malicious-bots',
permanent: false,
},
{
source: '/having-fun-with-javascript-obfuscation',
destination: 'https://old.nullpt.rs/having-fun-with-javascript-obfuscation',
permanent: false,
},
{
source: '/dissecting-a-vm',
destination: 'https://old.nullpt.rs/dissecting-a-vm',
permanent: false,
},
{
source: '/how-do-i-make-a-bot',
destination: 'https://old.nullpt.rs/how-do-i-make-a-bot',
permanent: false,
},
];
},
};
const withMDX = require('@next/mdx')();
module.exports = withMDX(config);