Skip to content

Conversation

@dav-is
Copy link
Contributor

@dav-is dav-is commented Dec 12, 2018

Fixes #5674

This adds config option

// next.config.js
module.exports = {
  crossOrigin: 'anonymous'
}

This config option is defined in the webpack Define Plugin at build.
Head and NextScript now use the config option, if it's not explicitly set on the element.
This value is now passed to Webpack so it can add it to scripts that it loads.
The value is now used in PageLoader (on the client) so it can add it to the scripts and links that it loads.
Using <Head crossOrigin> or <NextScript crossOrigin> is now deprecated.

@dav-is dav-is mentioned this pull request Dec 12, 2018
14 tasks
Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 perfect PR

@timneutkens timneutkens merged commit 419bec0 into vercel:canary Dec 13, 2018
@dav-is dav-is deleted the crossorigin branch December 13, 2018 00:06
@timneutkens
Copy link
Member

Will ship to canary in the morning 👍

@lock lock bot locked as resolved and limited conversation to collaborators Dec 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CrossOrigin attribute not added to scripts loaded by PageLoader

2 participants