-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
40 lines (39 loc) · 1.04 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
const { withPlausibleProxy } = require("next-plausible");
const withPWA = require("next-pwa");
module.exports = withPlausibleProxy()(
withPWA({
reactStrictMode: false, //true
images: {
domains: [],
},
async redirects() {
return [
{
source: "/user/:path*",
destination: "/u/:path*",
permanent: true,
},
{ source: "/comments/:path*", destination: "/:path*", permanent: true },
{source: "/r/:sub/w/:page*", destination: "/r/:sub/wiki/:page*", permanent: true}
];
},
async rewrites() {
return [
{
source: "/js/script.js",
destination: "https://plausible.io/js/plausible.js",
},
{
source: "/api/event", // Or '/api/event/' if you have `trailingSlash: true` in this config
destination: "https://plausible.io/api/event",
},
];
},
pwa: {
disable: process.env.NODE_ENV === "development",
dest: "public",
register: true,
skipWaiting: true,
},
})
);