ts-transformer-loader
v0.0.7
Published
Webpack loader to apply typescript transform to a ts source files
Downloads
10
Maintainers
Readme
ts-transformer-loader
ts-transformer-loader
applies custom typescript transformers in webpack.
It can be used with babel-loader with @babel/preset-typescript.
Install
npm install -D ts-transformer-loader
Configure
webpack.config.js:
module: {
rules: [
{
test: /\.(j|t)sx?$/,
use: [
'babel-loader',
{
loader: 'ts-transformer-loader',
options: {
getTransformers: require('./getTransformers'),
// pass a string if you are using thread-loader
// see https://github.com/s-panferov/awesome-typescript-loader/pull/531/files
// getTransformers: require.resolve('./getTransformers'),
},
},
],
},
],
...
}
See example.