-
Notifications
You must be signed in to change notification settings - Fork 27.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Experimental] Nomodule polyfills chunk #10212
Merged
Timer
merged 43 commits into
vercel:canary
from
timneutkens:fix/promise-polyfill-finally
Jan 30, 2020
+1,519
−78
Merged
Changes from 17 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
1d2d091
Polyfill Promise in polyfills chunk
timneutkens 9015d74
Override promise polyfill to use built-in
timneutkens b08c2a2
Update sizes
timneutkens c3f9f77
Update polyfills
timneutkens c71a723
Test
Timer fe55d19
Add dep
Timer 89da33b
Use iife
Timer ab26bce
Unscope
Timer 09791d1
Merge branch 'canary' into polyfilling/test
ijjk e5d769d
Revert "Unscope"
Timer 7802b7a
trigger
Timer 12d8177
Merge branch 'polyfilling/test' into fix/promise-polyfill-finally
Timer 53eccbe
Merge branch 'canary' into fix/promise-polyfill-finally
Timer 7977e75
Merge branch 'canary' of github.com:zeit/next.js into fix/promise-pol…
timneutkens 19d77a5
Remove unused code
timneutkens b22a37b
Merge branch 'fix/promise-polyfill-finally' of github.com:timneutkens…
timneutkens 4c2fc0e
Set helpers to true
timneutkens 5c8ff1c
Update yarn.lock
timneutkens 794b73f
Fix test
timneutkens 43fb461
Merge branch 'canary' of github.com:zeit/next.js into fix/promise-pol…
timneutkens 63fbf1d
Update polyfills size
timneutkens d2d08fb
Add comment
timneutkens 3a0fea9
Add back comment
timneutkens 6821622
Put polyfills optimization under experimental flag
timneutkens d46e29d
Fix filename
timneutkens 5ccf93d
bring back promise for backwards compat until experimental feature is…
timneutkens cd0593b
Merge branch 'canary' into fix/promise-polyfill-finally
Timer 9af927e
fix resolve alias check
Timer a5763e5
correct loader
Timer 1d9863b
fix logic branches
Timer 6dac29e
adjust !!
Timer 00f2766
adjust cache key
Timer 4f593b7
Conditionally branch polyfill
Timer 1b32c41
fix promise polyfill branching
Timer d1598d6
Re-add runtime
Timer 79d7e4b
fix base object
Timer 387e9c5
fix yarn lock
Timer ee452a6
Add cache key
Timer d4386eb
correctly set caller
Timer 1d0f354
add basic test
Timer 5caee6f
Merge branch 'canary' into fix/promise-polyfill-finally
Timer eb84646
Increment h=>i
Timer 111ec35
increment to j just in case
Timer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@next/polyfill-nomodule", | ||
"version": "0.0.0", | ||
"description": "A polyfill for non-dead, nomodule browsers.", | ||
"main": "dist/polyfill-nomodule.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"prepublish": "microbundle src/index.js -f iife --no-sourcemap --external none", | ||
"build": "microbundle watch src/index.js -f iife --no-sourcemap --external none" | ||
}, | ||
"devDependencies": { | ||
"core-js": "3.6.4", | ||
"microbundle": "0.11.0", | ||
"object-assign": "4.1.1", | ||
"promise-polyfill": "8.1.3", | ||
"url-polyfill": "1.1.7", | ||
"whatwg-fetch": "3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import 'core-js/modules/es6.array.copy-within' | ||
import 'core-js/modules/es6.array.fill' | ||
import 'core-js/modules/es6.array.find' | ||
import 'core-js/modules/es6.array.find-index' | ||
import 'core-js/modules/es7.array.flat-map' | ||
import 'core-js/modules/es6.array.from' | ||
import 'core-js/modules/es7.array.includes' | ||
import 'core-js/modules/es6.array.iterator' | ||
import 'core-js/modules/es6.array.of' | ||
import 'core-js/modules/es6.array.species' | ||
import 'core-js/modules/es6.function.has-instance' | ||
import 'core-js/modules/es6.map' | ||
import 'core-js/modules/es6.number.constructor' | ||
import 'core-js/modules/es6.number.epsilon' | ||
import 'core-js/modules/es6.number.is-finite' | ||
import 'core-js/modules/es6.number.is-integer' | ||
import 'core-js/modules/es6.number.is-nan' | ||
import 'core-js/modules/es6.number.is-safe-integer' | ||
import 'core-js/modules/es6.number.max-safe-integer' | ||
import 'core-js/modules/es6.number.min-safe-integer' | ||
import 'core-js/modules/es7.object.entries' | ||
import 'core-js/modules/es7.object.get-own-property-descriptors' | ||
import 'core-js/modules/es6.object.is' | ||
import 'core-js/modules/es7.object.values' | ||
import 'core-js/modules/es6.reflect.apply' | ||
import 'core-js/modules/es6.reflect.construct' | ||
import 'core-js/modules/es6.reflect.define-property' | ||
import 'core-js/modules/es6.reflect.delete-property' | ||
import 'core-js/modules/es6.reflect.get' | ||
import 'core-js/modules/es6.reflect.get-own-property-descriptor' | ||
import 'core-js/modules/es6.reflect.get-prototype-of' | ||
import 'core-js/modules/es6.reflect.has' | ||
import 'core-js/modules/es6.reflect.is-extensible' | ||
import 'core-js/modules/es6.reflect.own-keys' | ||
import 'core-js/modules/es6.reflect.prevent-extensions' | ||
import 'core-js/modules/es6.reflect.set' | ||
import 'core-js/modules/es6.reflect.set-prototype-of' | ||
import 'core-js/modules/es6.regexp.constructor' | ||
import 'core-js/modules/es6.regexp.flags' | ||
import 'core-js/modules/es6.regexp.match' | ||
import 'core-js/modules/es6.regexp.replace' | ||
import 'core-js/modules/es6.regexp.split' | ||
import 'core-js/modules/es6.regexp.search' | ||
import 'core-js/modules/es6.set' | ||
import 'core-js/modules/es6.symbol' | ||
import 'core-js/modules/es7.symbol.async-iterator' | ||
import 'core-js/modules/es6.string.code-point-at' | ||
import 'core-js/modules/es6.string.ends-with' | ||
import 'core-js/modules/es6.string.from-code-point' | ||
import 'core-js/modules/es6.string.includes' | ||
import 'core-js/modules/es6.string.iterator' | ||
import 'core-js/modules/es7.string.pad-start' | ||
import 'core-js/modules/es7.string.pad-end' | ||
import 'core-js/modules/es6.string.raw' | ||
import 'core-js/modules/es6.string.repeat' | ||
import 'core-js/modules/es6.string.starts-with' | ||
import 'core-js/modules/es7.string.trim-left' | ||
import 'core-js/modules/es7.string.trim-right' | ||
import 'core-js/modules/es6.weak-map' | ||
import 'core-js/modules/es6.weak-set' | ||
|
||
// Specialized Packages: | ||
import 'promise-polyfill/src/polyfill' | ||
import 'whatwg-fetch' | ||
import 'url-polyfill' | ||
import assign from 'object-assign' | ||
Object.assign = assign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import '__next_polyfill__fetch' | ||
import 'url-polyfill' | ||
Object.assign = require('__next_polyfill__object_assign') | ||
import '@next/polyfill-nomodule' | ||
timneutkens marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6614,6 +6614,11 @@ finalhandler@~1.1.2: | |
statuses "~1.5.0" | ||
unpipe "~1.0.0" | ||
|
||
[email protected]: | ||
version "0.1.0" | ||
resolved "https://registry.yarnpkg.com/finally-polyfill/-/finally-polyfill-0.1.0.tgz#2a17b16581d9477db16a703c7b79a898ac0b7d50" | ||
integrity sha512-J1LEcZ5VXe1l3sEO+S//WqL5wcJ/ep7QeKJA6HhNZrcEEFj0eyC8IW3DEZhxySI2bx3r85dwAXz+vYPGuHx5UA== | ||
|
||
find-cache-dir@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SInce corejs 3 has a URL polyfill should we consider using that instead of
url-polyfill
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's smaller!