Skip to content

Commit

Permalink
Updating object.assign polyfill to fix aliasing
Browse files Browse the repository at this point in the history
  • Loading branch information
janicklas-ralph committed Oct 18, 2019
1 parent 7ca78a2 commit f78f772
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ export default async function getBaseWebpackConfig(
'polyfills',
'object-assign.js'
),
'object.assign$': path.join(
__dirname,
'polyfills',
'object-assign.js'
),
'@babel/runtime-corejs2/core-js/object/assign':
'next/dist/build/polyfills/object-assign.js',
}
Expand Down
2 changes: 1 addition & 1 deletion packages/next/client/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import 'whatwg-fetch'
Object.assign = require('object-assign')
Object.assign = require('object.assign/polyfill')()
1 change: 1 addition & 0 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"mini-css-extract-plugin": "0.8.0",
"mkdirp": "0.5.1",
"node-fetch": "2.6.0",
"object.assign": "4.1.0",
"ora": "3.4.0",
"path-to-regexp": "2.1.0",
"pnp-webpack-plugin": "1.5.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10330,7 +10330,7 @@ object-visit@^1.0.0:
dependencies:
isobject "^3.0.0"

object.assign@^4.1.0:
object.assign@4.1.0, object.assign@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
Expand Down

0 comments on commit f78f772

Please sign in to comment.