there are now two entry files
--src
|--- a.js
|--- b.js
a.js
class Test{
constructor(){
this.a = 123;
}
show = ()=>{
console.log(this.a)
}
}
export default new Test();
b.js
import "./a"
webapck.config
{
entry:{
a:"./src/a.js"
b:"./src/b.js"
}
}
I want to introduce polyfill
into an entry file (a may also introduce other modules) or use es2015
to convert to es5
while b entry file remains the original output, then the output es6 code does not have polyfill.
has anyone ever tried this way