Skip to content

Commit

Permalink
Use core-js promise polyfill for nomodule browsers
Browse files Browse the repository at this point in the history
Also updated to the core-js@3 features modules instead of importing the exact modules directly.

Fixes vercel#10966
  • Loading branch information
timneutkens committed Mar 11, 2020
1 parent a4ab088 commit 7feb5db
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 62 deletions.
1 change: 0 additions & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"core-js": "3.6.4",
"microbundle": "0.11.0",
"object-assign": "4.1.1",
"promise-polyfill": "8.1.3",
"url-polyfill": "1.1.8",
"whatwg-fetch": "3.0.0"
}
Expand Down
124 changes: 63 additions & 61 deletions packages/next-polyfill-nomodule/src/index.js
Original file line number Diff line number Diff line change
@@ -1,66 +1,68 @@
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'
import 'core-js/features/array/copy-within'
import 'core-js/features/array/fill'
import 'core-js/features/array/find'
import 'core-js/features/array/find-index'
import 'core-js/features/array/flat-map'
import 'core-js/features/array/from'
import 'core-js/features/array/includes'
import 'core-js/features/array/iterator'
import 'core-js/features/array/of'
import 'core-js/features/array/species'
import 'core-js/features/function/has-instance'
import 'core-js/features/map'
import 'core-js/features/number/constructor'
import 'core-js/features/number/epsilon'
import 'core-js/features/number/is-finite'
import 'core-js/features/number/is-integer'
import 'core-js/features/number/is-nan'
import 'core-js/features/number/is-safe-integer'
import 'core-js/features/number/max-safe-integer'
import 'core-js/features/number/min-safe-integer'
import 'core-js/features/object/entries'
import 'core-js/features/object/get-own-property-descriptors'
import 'core-js/features/object/is'
import 'core-js/features/object/values'
import 'core-js/features/reflect/apply'
import 'core-js/features/reflect/construct'
import 'core-js/features/reflect/define-property'
import 'core-js/features/reflect/delete-property'
import 'core-js/features/reflect/get'
import 'core-js/features/reflect/get-own-property-descriptor'
import 'core-js/features/reflect/get-prototype-of'
import 'core-js/features/reflect/has'
import 'core-js/features/reflect/is-extensible'
import 'core-js/features/reflect/own-keys'
import 'core-js/features/reflect/prevent-extensions'
import 'core-js/features/reflect/set'
import 'core-js/features/reflect/set-prototype-of'
import 'core-js/features/regexp/constructor'
import 'core-js/features/regexp/flags'
import 'core-js/features/regexp/match'
import 'core-js/features/regexp/replace'
import 'core-js/features/regexp/split'
import 'core-js/features/regexp/search'
import 'core-js/features/set'
import 'core-js/features/symbol'
import 'core-js/features/symbol/async-iterator'
import 'core-js/features/string/code-point-at'
import 'core-js/features/string/ends-with'
import 'core-js/features/string/from-code-point'
import 'core-js/features/string/includes'
import 'core-js/features/string/iterator'
import 'core-js/features/string/pad-start'
import 'core-js/features/string/pad-end'
import 'core-js/features/string/raw'
import 'core-js/features/string/repeat'
import 'core-js/features/string/starts-with'
import 'core-js/features/string/trim-left'
import 'core-js/features/string/trim-right'
import 'core-js/features/weak-map'
import 'core-js/features/weak-set'
import 'core-js/features/promise'
import 'core-js/features/promise/all-settled'
import 'core-js/features/promise/finally'

// Specialized Packages:
import 'promise-polyfill/src/polyfill'
import 'whatwg-fetch'
import 'url-polyfill'
import assign from 'object-assign'
Expand Down

0 comments on commit 7feb5db

Please sign in to comment.