I have core js and core js pure in my bundle. Is this right?

Viewed 478

I am currently using webpack to bundle my project and my main.js is pretty big so I currently looking for a way to reduce size of my main.js. I can see the of the the biggest things in my bundles is core-js stuff. I am using core-js to support IE11 mainly for promise and generator(Saga)

I have some setup on babelrc.

["@babel/preset-env", {
      "useBuiltIns": "usage",
      "corejs": 3,
      "targets": {
        "ie": "11"
      }
}]

["@babel/transform-runtime", {
      "corejs": 3
}],

index.js

import 'core-js/stable'
import 'regenerator-runtime/runtime'

I like to know if both of them should be in the bundle or one of each.

enter image description here

0 Answers
Related