@egret/ts-transformer
v1.2.3
Published
```bash npm install @egret/ts-transformer --save-dev ```
Downloads
28
Keywords
Readme
TypeScript Transformer 编译插件
如何使用
npm install @egret/ts-transformer --save-dev
修改 webpack 配置文件:
const transformers = require('@egret/ts-transformer');
module.exports = {
module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
getCustomTransformers: (program) => {
return ({
before: [
transformers.emitClassName(),
transformers.emitDefine({ DEBUG: true })
]
})
}
}
}
]
},
};