Unverified Commit ba5524d0 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Remove unnecessary Object.assign (#55882)

Noticed this was combining two objects but it can just be created as one object.
parent 2248cfc0
...@@ -285,35 +285,26 @@ function getOptimizedAliases(): { [pkg: string]: string } { ...@@ -285,35 +285,26 @@ function getOptimizedAliases(): { [pkg: string]: string } {
const stubObjectAssign = path.join(__dirname, 'polyfills', 'object-assign.js') const stubObjectAssign = path.join(__dirname, 'polyfills', 'object-assign.js')
const shimAssign = path.join(__dirname, 'polyfills', 'object.assign') const shimAssign = path.join(__dirname, 'polyfills', 'object.assign')
return Object.assign( return {
{}, unfetch$: stubWindowFetch,
{ 'isomorphic-unfetch$': stubWindowFetch,
unfetch$: stubWindowFetch, 'whatwg-fetch$': path.join(
'isomorphic-unfetch$': stubWindowFetch, __dirname,
'whatwg-fetch$': path.join( 'polyfills',
__dirname, 'fetch',
'polyfills', 'whatwg-fetch.js'
'fetch', ),
'whatwg-fetch.js' 'object-assign$': stubObjectAssign,
), // Stub Package: object.assign
}, 'object.assign/auto': path.join(shimAssign, 'auto.js'),
{ 'object.assign/implementation': path.join(shimAssign, 'implementation.js'),
'object-assign$': stubObjectAssign, 'object.assign$': path.join(shimAssign, 'index.js'),
'object.assign/polyfill': path.join(shimAssign, 'polyfill.js'),
// Stub Package: object.assign 'object.assign/shim': path.join(shimAssign, 'shim.js'),
'object.assign/auto': path.join(shimAssign, 'auto.js'),
'object.assign/implementation': path.join( // Replace: full URL polyfill with platform-based polyfill
shimAssign, url: require.resolve('next/dist/compiled/native-url'),
'implementation.js' }
),
'object.assign$': path.join(shimAssign, 'index.js'),
'object.assign/polyfill': path.join(shimAssign, 'polyfill.js'),
'object.assign/shim': path.join(shimAssign, 'shim.js'),
// Replace: full URL polyfill with platform-based polyfill
url: require.resolve('next/dist/compiled/native-url'),
}
)
} }
// Alias these modules to be resolved with "module" if possible. // Alias these modules to be resolved with "module" if possible.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment