UNPKG

318 BJavaScriptView Raw
1const tsc = require('typescript');
2const tsConfig = require('./tsconfig.json');
3
4module.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