-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
59 lines (53 loc) · 1.36 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
const keys = require("./keys.json");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
return [
{
source: "/book/:book/:chapter",
destination: "https://wol.jw.org/wol/b/r1/lp-e/nwtsty/:book/:chapter",
},
{
source: "/meetings/:year/:week",
destination: "https://wol.jw.org/en/wol/meetings/r1/lp-e/:year/:week",
},
{
source: "/text/:slug*",
destination: "https://wol.jw.org/en/wol/h/r1/lp-e/:slug*",
},
{
source: "/scripture/:slug*",
destination: "https://wol.jw.org/:slug*",
},
{
source: "/jwnewsRSS",
destination: "https://www.jw.org/en/news/rss/FullNewsRSS/feed.xml",
},
{
source: "/jwnewsStory/:slug*",
destination: "https://www.jw.org/en/news/:slug*",
},
{
source: "/news",
destination: `https://newsapi.org/v2/top-headlines?sources=cnn&apiKey=${keys.keys.news}`,
},
];
},
//output: "standalone",
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
{
protocol: "http",
hostname: "**",
},
],
},
};
module.exports = withBundleAnalyzer(nextConfig);