I am writing webpack.config.js
to transpile typescript (to be more precise tsx) into ES5 using tsloader
and babel-loader
.
I have two questions:
1) Do we still need babel-loader
even though tsloader
output ES5 files?
2) Does it make sense to set compilerOptions.module
in tsconfig.json
to es6
when the target is es5
?
tsconfig.json
is as follows:
{
"compilerOptions": {
"module": "es6",
"target": "es5",
"jsx": "react"
}
}
Thanks in advance.