Closed hayeah closed 7 years ago
@hayeah We already adding the polyfill for that. (Actually babel) So it'll work by default and you don't need to do this hack.
I'm testing with Firefox 28 which doesn't have Object.assign
but it doesn't work with latest 2.0.0-beta.39. Here are my presets in .babelrc
:
"presets": [
"es2015",
"stage-0",
"next/babel",
"react"
],
am I missing something?
@xdamman could you open a new issue and a possible sample app to re-produce this issue.
@arunoda here: https://github.com/zeit/next.js/issues/1506
WeChat is a popular chat app in China. On Android it embeds Tecent's custom Webkit browser "X5". This browser requires polyfill for
Object.assign
.Maybe it would be nice to have a more declarative way to add polyfills. Right now I used
next.conig.js
to modify the main.js entry:Where
polyfill.js
is the following (note that the feature detection has to use string concat to prevent babel from transforming it to its ownassign
):