Skip to content

Commit e137c00

Browse files
committed
set comments if asset file not present
1 parent 4b635cb commit e137c00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ class NetlifyServerPushPlugin {
77
apply(compiler) {
88
compiler.plugin('emit', (compilation, callback) => {
99
const routes = [];
10-
let mainJs;
11-
let mainCss;
10+
// Set default value as comment incase if this file is not present
11+
let mainJs = '# no js files';
12+
let mainCss = '# no css files';
1213

1314
for (const filename in compilation.assets) {
1415
if (!/\.map$/.test(filename)) {

0 commit comments

Comments
 (0)