Skip to content

Commit

Permalink
feat(manifest): support crossorigin option (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyarasu authored and pi0 committed Aug 24, 2018
1 parent 12c17dc commit ccb2c33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/manifest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ function addManifest (options) {

// Add manifest meta
if (!find(this.options.head.link, 'rel', 'manifest')) {
this.options.head.link.push({ rel: 'manifest', href: fixUrl(`${manifest.publicPath}/${manifestFileName}`) })
const baseAttribute = { rel: 'manifest', href: fixUrl(`${manifest.publicPath}/${manifestFileName}`) }
const attribute = manifest.crossorigin ? Object.assign({}, baseAttribute, { crossorigin: manifest.crossorigin }) : baseAttribute
this.options.head.link.push(attribute)
} else {
console.warn('Manifest meta already provided!')
}
Expand Down

0 comments on commit ccb2c33

Please sign in to comment.