-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
executable file
·51 lines (49 loc) · 1.16 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
const withPlugins = require('next-compose-plugins')
const withPWA = require('next-pwa')
const withOptimizeImage = require('next-optimized-images')
const runtimeCaching = require('next-pwa/cache')
const path = require('path')
// const withOffline = require("next-offline");
const nextConfig = {
generateBuildId: async () => {
// You can, for example, get the latest git commit hash here
return "-dlingo-secret-1234";
},
images: {
domains: ["blog.shipper.id", "randomuser.me"],
},
env: {
baseUrl: process.env.NODE_BASE_URL,
},
trailingSlash: false,
exportPathMap: function () {
return {
"/": { page: "/" },
};
},
webpack(config, option) {
config.experiments = {};
config.resolve.alias["@"] = path.join(__dirname, ".");
return config;
},
devIndicators: {
autoPrerender: false,
},
};
module.exports = withPlugins(
[
withOptimizeImage,
[
withPWA,
{
pwa: {
disable: process.env.NODE_ENV === "development",
dest: "public",
register: process.env.NODE_ENV !== "development",
swSrc: "service-worker.js",
},
},
],
],
nextConfig
);