Skip to content

Commit

Permalink
Merge pull request #237 from kaliberjs/polyfill-without-defer
Browse files Browse the repository at this point in the history
Remove defer attribute from polyfill script
  • Loading branch information
Peeke authored Sep 5, 2022
2 parents 21ed6a0 + 885a2d1 commit 64e5e44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/content/how-to/polyfills.raw.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default (
{polyfill(['default', 'es2015', 'es2016', 'es2017', 'fetch'])}
{/*
this will output:
<script defer src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default,es2015,es2016,es2017,fetch" crossorigin="anonymous" />
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default,es2015,es2016,es2017,fetch" crossorigin="anonymous" />
*/}
</head>
<body />
Expand Down
2 changes: 1 addition & 1 deletion library/lib/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export default function polyfill(features = []) {
const src = isProduction
? `https://cdn.polyfill.io/v3/polyfill.min.js?rum=0&unknown=polyfill&flags=gated&features=${features.join(',')}`
: `https://cdn.polyfill.io/v3/polyfill.js?rum=0&unknown=polyfill&flags=gated&features=${features.join(',')}`
return <script defer src={src} crossOrigin="anonymous" />
return <script src={src} crossOrigin="anonymous" />
}

0 comments on commit 64e5e44

Please sign in to comment.