Object.assign is not a function

后端 未结 2 2048
梦谈多话
梦谈多话 2020-12-09 04:41

I\'m using babel with gulp and create a simple DOM library in ES6. But after running and when i\'m going to use it, I got the Object.assign is not a function in

2条回答
  •  误落风尘
    2020-12-09 05:32

    1. Install babel-core:

    $ npm install babel-core --save-dev

    1. Import polyfill module into your js:

    import 'babel-core/polyfill';

    1. Use babel to compile your code!

提交回复
热议问题