-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
43 lines (41 loc) · 1.13 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
const withSass = require("@zeit/next-sass");
const withCSS = require("@zeit/next-css");
const withFonts = require("next-fonts");
const { join } = require("path");
const copyfiles = require("copyfiles");
const withOffline = require("next-offline");
const PRECACHE_DIR = "precache";
module.exports = withOffline(
withSass(
withCSS(
withFonts({
generateInDevMode: true,
workboxOpts: {
templatedUrls: {
'/' : '/index.html',
'/index' : '/index/index.html',
'/index/' : '/index/index.html',
'/capture' : '/capture/index.html',
'/capture/' : '/capture/index.html',
'/animation' : '/animation/index.html',
'/animation/' : '/animation/index.html'
},
runtimeCaching: [
{
urlPattern: /_next\/static/,
handler: "networkFirst"
},
{
urlPattern: /static/,
handler: "networkFirst"
},
{
urlPattern: /.html/,
handler: "networkFirst"
}
]
}
})
)
)
);