Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
hardcode crossorigin script attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wenzel committed Apr 23, 2019
1 parent ae778bd commit bdbc84f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 2 additions & 2 deletions plugins/ssr-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ const SSRBodyTemplate = createPlugin/*:: <SSRBodyTemplateDepsType,SSRBodyTemplat

for (let url of criticalChunkUrls) {
const crossoriginAttr = url.startsWith(__webpack_public_path__)
? ''
: ' crossorigin="anonymous"';
? ' crossorigin="anonymous"'
: '';
preloadHints.push(
`<link rel="preload" href="${url}" nonce="${
ctx.nonce
Expand Down
14 changes: 0 additions & 14 deletions test/e2e/dynamic-import-app/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,6 @@ test('`fusion build` app with dynamic imports integration', async () => {
'one extra script after loading new route'
);

t.ok(
await page.$$eval('script[src]:not([type="application/json"])', els =>
els.every(el => el.crossOrigin === null)
),
'non-module scripts do not have crossorigin attribute'
);

t.ok(
await page.$$eval('script[src]:not([type="application/json"])', els =>
// eslint-disable-next-line
Expand Down Expand Up @@ -274,13 +267,6 @@ test('`fusion build` app with Safari user agent and same-origin', async () => {
'one extra script after loading new route'
);

t.ok(
await page.$$eval('script[src]:not([type="application/json"])', els =>
els.every(el => el.crossOrigin === null)
),
'non-module scripts do not have crossorigin attribute'
);

t.ok(
await page.$$eval('script[src]:not([type="application/json"])', els =>
// eslint-disable-next-line
Expand Down

0 comments on commit bdbc84f

Please sign in to comment.