From 66de0536f69a65f6423b5e39c230c7d630e38d25 Mon Sep 17 00:00:00 2001 From: Porfirio Date: Wed, 18 Jul 2018 17:14:03 +0100 Subject: [PATCH] gatsby-plugin-netlify generates wrong js Link The _headers file generated is like: ``` /404.html Link: ; rel=preload; as=script Link: ; rel=preload; as=script ``` When `public` folder was rearranged and js files start be puted on `/public/js` broke this --- packages/gatsby-plugin-netlify/src/build-headers-program.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-plugin-netlify/src/build-headers-program.js b/packages/gatsby-plugin-netlify/src/build-headers-program.js index 3734a0fba07e1..e78a37449812a 100644 --- a/packages/gatsby-plugin-netlify/src/build-headers-program.js +++ b/packages/gatsby-plugin-netlify/src/build-headers-program.js @@ -42,7 +42,7 @@ function createScriptHeaderGenerator(manifest, pathPrefix) { } // Always add starting slash, as link entries start with slash as relative to deploy root - return linkTemplate(`${pathPrefix}/${chunk}`) + return linkTemplate(`${pathPrefix}/js/${chunk}`) } }