'Symbol' is undefined in IE after using babel

前端 未结 6 1401
臣服心动
臣服心动 2020-12-02 15:12

I have a reactjs app written using ES6 standards, and I use webpack to build it. The webpack loads the js modules using <

6条回答
  •  日久生厌
    2020-12-02 15:51

    in documentation about Runtime

    // in bash
    npm install babel-transform-runtime --save-dev
    
    // in gulpfile
    .pipe(babel({
      plugins: ['transform-runtime']
    }))
    

    edit: better yet on heroku in prod mode use --save instead of --save-dev

提交回复
热议问题