-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
49 lines (45 loc) · 1.14 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
const { Config } = require("next-recompose-plugins");
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "http",
hostname: "localhost",
port: "54321",
pathname: "/**",
},
{
protocol: "https",
hostname: "*.googleusercontent.com",
port: "",
pathname: "**",
},
{
protocol: "https",
hostname: process.env.NEXT_PUBLIC_SUPABASE_URL.replace(
/(^\w+:|^)\/\//,
""
),
port: "",
pathname: "**",
},
],
},
};
const withSerwist = require("@serwist/next");
const withNextIntl = require("next-intl/plugin");
const config = new Config(nextConfig)
.applyPlugin((phase, args, config) => {
return withNextIntl("./i18n.ts")(config);
}, "next-intl/plugin")
.applyPlugin((phase, args, config) => {
return withSerwist.default({
swSrc: "app/sw.ts",
swDest: "public/sw.js",
cacheOnFrontEndNav: true,
disable: process.env.NODE_ENV === "development",
})(config);
}, "@serwist/next")
.build();
module.exports = config;