Only Load JS Files for Polyfills (#9628)
* Adding native-url package * Bumping native-url version * Upgrading native-url * Logging stats object for debugging * Logging stats object for debugging * Adding try catch to the error lines * Experimenting with regex * Experimenting with regex * Experimenting with regex * Testing regex changes * Fixing defer-script test case to not include polyfill.js * Meging changes with existing polyfill work * Bumping version * adjust webpack config * Reduce size in size test * Remove 1kb from legacy * Bumping native-url version, includes fix for IE11 * Update lock file * Updating native-url, fixes issue on IE11 * Fix sourcemap being added in document
This commit is contained in:
parent
b6bdab57c9
commit
9bf48687a7
1 changed files with 3 additions and 1 deletions
|
@ -624,7 +624,9 @@ export class NextScript extends Component<OriginProps> {
|
|||
const { _devOnlyInvalidateCacheQueryString } = this.context
|
||||
|
||||
return polyfillFiles
|
||||
.filter(polyfill => !/\.module\.js$/.test(polyfill))
|
||||
.filter(
|
||||
polyfill => polyfill.endsWith('.js') && !/\.module\.js$/.test(polyfill)
|
||||
)
|
||||
.map(polyfill => (
|
||||
<script
|
||||
key={polyfill}
|
||||
|
|
Loading…
Reference in a new issue