mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Fix polyfills (#5013)
This commit is contained in:
parent
bd5ee26841
commit
bb13e941e5
4
.babelrc
4
.babelrc
|
@ -8,6 +8,8 @@
|
|||
"@babel/plugin-syntax-dynamic-import",
|
||||
"@babel/plugin-proposal-object-rest-spread",
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
"@babel/plugin-transform-runtime"
|
||||
["@babel/plugin-transform-runtime", {
|
||||
"corejs": 2
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import Loadable from 'react-loadable'
|
|||
// This is needed because Webpack's dynamic loading(common chunks) code
|
||||
// depends on Promise.
|
||||
// So, we need to polyfill it.
|
||||
// See: https://github.com/webpack/webpack/issues/4254
|
||||
// See: https://webpack.js.org/guides/code-splitting/#dynamic-imports
|
||||
if (!window.Promise) {
|
||||
window.Promise = Promise
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
"@babel/preset-env": "7.0.0-rc.1",
|
||||
"@babel/preset-react": "7.0.0-rc.1",
|
||||
"@babel/runtime": "7.0.0-rc.1",
|
||||
"@babel/runtime-corejs2": "7.0.0-rc.1",
|
||||
"@babel/template": "7.0.0-rc.1",
|
||||
"ansi-html": "0.0.7",
|
||||
"autodll-webpack-plugin": "0.4.2",
|
||||
|
|
|
@ -601,6 +601,13 @@
|
|||
"@babel/helper-plugin-utils" "7.0.0-beta.42"
|
||||
"@babel/plugin-transform-typescript" "7.0.0-beta.42"
|
||||
|
||||
"@babel/runtime-corejs2@7.0.0-rc.1":
|
||||
version "7.0.0-rc.1"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.0.0-rc.1.tgz#cfef134702b731d69ad35f9b44b9326cc0d879bc"
|
||||
dependencies:
|
||||
core-js "^2.5.7"
|
||||
regenerator-runtime "^0.12.0"
|
||||
|
||||
"@babel/runtime@7.0.0-rc.1":
|
||||
version "7.0.0-rc.1"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-rc.1.tgz#42f36fc5817911c89ea75da2b874054922967616"
|
||||
|
@ -2135,7 +2142,7 @@ core-js@^1.0.0:
|
|||
version "1.2.7"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
|
||||
|
||||
core-js@^2.4.0, core-js@^2.5.0:
|
||||
core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.7:
|
||||
version "2.5.7"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"
|
||||
|
||||
|
|
Loading…
Reference in a new issue