add dark mode to precache
This commit is contained in:
parent
42bdd40f91
commit
acd8a8de5a
@ -32,7 +32,7 @@ function generatePrecacheManifest () {
|
|||||||
|
|
||||||
const staticDir = join(__dirname, '../public')
|
const staticDir = join(__dirname, '../public')
|
||||||
const staticFiles = walkSync(staticDir)
|
const staticFiles = walkSync(staticDir)
|
||||||
const staticMatch = f => [/\.(gif|jpe?g|ico|png|ttf|woff|woff2|webmanifest)$/].some(m => m.test(f))
|
const staticMatch = f => [/\.(gif|jpe?g|ico|png|ttf|woff|woff2|webmanifest)$/, /dark\.js$/].some(m => m.test(f))
|
||||||
staticFiles.filter(staticMatch).forEach(file => {
|
staticFiles.filter(staticMatch).forEach(file => {
|
||||||
const stats = statSync(file)
|
const stats = statSync(file)
|
||||||
addToManifest(file, file.slice(staticDir.length), stats.size)
|
addToManifest(file, file.slice(staticDir.length), stats.size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user