Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ee06c96

Browse files
fix typo
1 parent 754b3dd commit ee06c96

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎index.js‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ class NetlifyServerPushPlugin {
2020

2121
apply(compiler) {
2222
const handler = (compilation, callback) => {
23-
const routes = [];
24-
2523
let manifest = compilation.assets['push-manifest.json'];
2624
if (!manifest) {
2725
// on pre-render build this is not present and thus need an early exit
@@ -39,16 +37,16 @@ class NetlifyServerPushPlugin {
3937

4038
const redirects = `${this.redirects.join('\n')}\n/* /index.html 200`;
4139

42-
for(const route in manifest) {
40+
for(const route in manifest) {
4341
const files = Object.keys(manifest[route]);
4442
let routePreloadText = `${route}`;
4543
files.forEach(file => {
4644
const details = manifest[route][file];
47-
routePreloadText += `\n\tLink: </${file}>; rel=preload; as=${details.type}`
48-
if (/^bundle(.+)\.esm\.js$/.test(filename)) {
45+
routePreloadText += `\n\tLink: </${file}>; rel=preload; as=${details.type}`;
46+
if (/^bundle(.+)\.esm\.js$/.test(file)) {
4947
routePreloadText += '; crossorigin=anonymous';
5048
}
51-
})
49+
});
5250
headers = `${headers}\n${routePreloadText}`;
5351
}
5452

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /