I'm trying to implement web application using Babel 7, @babel/preset-env and @babel/polyfill.
// main.js
import a from 'a';
a.doSomething()
// a.js
export default class {
doSomething() {
// assume that here is some code that needs polyfills
}
}
If I should insert import '@babel/polyfill' to support old browsers, where should it be, either in main.js or a.js, or both of them?