Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit f7ae91c

Browse files
author
Stanislav Panferov
committed
fix(*): correctly process jsx option
1 parent d803445 commit f7ae91c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@ function ensureInstance(webpack: IWebPack, options: ICompilerOptions, instanceNa
194194
}
195195
}
196196

197+
if (typeof options.jsx !== 'undefined') {
198+
switch(options.jsx as any) {
199+
case 'react': options.jsx = ts.JsxEmit.React; break;
200+
case 'preserve': options.jsx = ts.JsxEmit.Preserve; break;
201+
}
202+
}
203+
197204
if (typeof options.rewriteImports == 'undefined') {
198205
options.rewriteImports = '';
199206
}

0 commit comments

Comments
 (0)