The generated bundle includes the same `Object.assign` polyfill five or six times. In the source code, we’re using object spread in six different places: $ grep -r '{\.\.\.' src src/components/Footer.spec.js: renderer.render(<Footer {...props} />) src/components/Header.spec.js: renderer.render(<Header {...props} />) src/components/MainSection.js: <TodoItem key={todo.id} todo={todo} {...actions} /> src/components/MainSection.spec.js: renderer.render(<MainSection {...props} />) src/components/TodoItem.spec.js: <TodoItem {...props} /> src/components/TodoTextInput.spec.js: <TodoTextInput {...props} /> At build time, Babel transpiles this down to `Object.assign`, relying on the polyfill. We should find out why the polyfill is not deduplicated correctly.
Created attachment 320122 [details] Patch
It appears with the latest patch that the problem is no longer an issue (react-scripts may have discovered upstream that there were dupes caused by their build pipeline). The changes in the latest work here LGTM. Deferring to Ryosuke.
Safari 10.1.2 (12603.3.8) Patched: 35.0 ± 0.71 33.4 ± 1.0 35.2 ± 1.4 34.8 ± 0.8 36.4 ± 1.1 35.9 ± 0.77 Unpatched: 33.3 ± 2.6 35.4 ± 0.99 35.5 ± 0.84 36.0 ± 0.99 35.5 ± 2.4 35.3 ± 0.66 Chrome 61.0.3163.79 Patched: 44.6 ± 1.5 43.8 ± 1.6 41.0 ± 3.2 43.5 ± 1.9 43.7 ± 1.8 44.7 ± 1.3 Unpatched: 43.8 ± 3.7 44.1 ± 1.5 46.3 ± 1.8 45.6 ± 1.6 46.3 ± 2.4 45.5 ± 1.4
Comment on attachment 320122 [details] Patch r=me
Comment on attachment 320122 [details] Patch Clearing flags on attachment: 320122 Committed r221841: <http://trac.webkit.org/changeset/221841>
All reviewed patches have been landed. Closing bug.
<rdar://problem/34693898>