1 | const tsc = require('typescript');
|
2 | const tsConfig = require('./tsconfig.json');
|
3 |
|
4 | module.exports = {
|
5 | process(src, path) {
|
6 | if (path.endsWith('.ts') || path.endsWith('.tsx')) {
|
7 | return tsc.transpile(
|
8 | src,
|
9 | tsConfig.compilerOptions,
|
10 | path,
|
11 | []
|
12 | );
|
13 | }
|
14 | return src;
|
15 | },
|
16 | }; |
\ | No newline at end of file |