Skip to content

Commit 4e6bc19

Browse files
committed
i
1 parent 2a79a17 commit 4e6bc19

5 files changed

Lines changed: 5 additions & 41 deletions

File tree

build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const crypto = require('crypto');
55
const cheerio = require('cheerio'); // npm install cheerio
66

77
let html = fs.readFileSync('src/index.html', 'utf8');
8-
const itemsToCopy = ['favicon.ico', '404.html', 'img'];
8+
const itemsToCopy = ['favicon.ico', 'img'];
99
const cacheBuster = () => crypto.randomBytes(3).toString('hex').slice(0, 5);
1010
const uniqueHash = cacheBuster();
1111
const addComment = (content, fileType) => {
@@ -94,6 +94,7 @@ Promise.all([bundleJS(), bundleCSS()])
9494
html = html.replace(/\s+/g, ' ');
9595
html = addComment(html, 'html');
9696
fs.writeFileSync('dist/index.html', html);
97+
fs.writeFileSync('dist/404.html', html);
9798
console.log('Build complete');
9899
})
99100
.catch((error) => {

dist/404.html

Lines changed: 2 additions & 39 deletions
Large diffs are not rendered by default.

dist/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)