diff --git a/src/Server/__tests__/getWebpackEarlyHints.jest.ts b/src/Server/__tests__/getWebpackEarlyHints.jest.ts index 014862461a9..029f4066c6a 100644 --- a/src/Server/__tests__/getWebpackEarlyHints.jest.ts +++ b/src/Server/__tests__/getWebpackEarlyHints.jest.ts @@ -24,12 +24,12 @@ describe("getWebpackEarlyHints", () => { expect(fs.readFileSync).toHaveBeenCalledWith(HINTS_PATH, "utf-8") expect(result.linkHeaders).toEqual([ - `; rel=preload; as=script; crossorigin`, - `; rel=preload; as=script; crossorigin`, + `; rel=preload; as=script`, + `; rel=preload; as=script`, ]) expect(result.linkPreloadTags).toEqual([ - ``, - ``, + ``, + ``, ]) }) @@ -43,12 +43,12 @@ describe("getWebpackEarlyHints", () => { expect(fs.readFileSync).toHaveBeenCalledWith(HINTS_PATH, "utf-8") expect(result.linkHeaders).toEqual([ - `; rel=preload; as=script; crossorigin`, - `; rel=preload; as=script; crossorigin`, + `; rel=preload; as=script`, + `; rel=preload; as=script`, ]) expect(result.linkPreloadTags).toEqual([ - ``, - ``, + ``, + ``, ]) }) }) diff --git a/src/Server/getWebpackEarlyHints.ts b/src/Server/getWebpackEarlyHints.ts index 60de6c0aa4a..e3b4ca248d5 100644 --- a/src/Server/getWebpackEarlyHints.ts +++ b/src/Server/getWebpackEarlyHints.ts @@ -34,11 +34,9 @@ export const getWebpackEarlyHints = (): { const links = chunkFiles.reduce( (acc, file) => { - acc.linkHeaders.push( - `<${cdnUrl}${file}>; rel=preload; as=script; crossorigin` - ) + acc.linkHeaders.push(`<${cdnUrl}${file}>; rel=preload; as=script`) acc.linkPreloadTags.push( - `` + `` ) return acc },