Search code examples
javascriptbabeljspolyfills

how can I use babel stand alone on internet explorer 11


I would like to use babel stand alone on internet explorer 11. I get the error

object doesn't support property or method 'assign'

I have seen the solution to use polyfills to fix it but I don't think it will work for me because I don't use node.js. We use an apache server with a php back end and use fortrabbit to host so we can't even add node.js.

And I was wondering if there was anything I can do to fix this problem without using anything node.js related.


Solution

  • That's because assign isn't a function on the object prototype in ie11. There is a polyfill that will work in the browser you can use here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign