Skip to content

Commit 904f339

Browse files
committed
- #23, fix for jsx: preserve option
1 parent 733337f commit 904f339

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/rollup-plugin-typescript2.cjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ function typescript(options) {
577577
if (_.isFunction(_this.error))
578578
_this.error(colors.red("failed to transpile '" + id + "'"));
579579
}
580-
var transpiled = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".js"); });
580+
var transpiled = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".js") || _.endsWith(entry.name, ".jsx"); });
581581
var map$$1 = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".map"); });
582582
var dts = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".d.ts"); });
583583
return {

dist/rollup-plugin-typescript2.es.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ function typescript(options) {
583583
if (isFunction(_this.error))
584584
_this.error(red("failed to transpile '" + id + "'"));
585585
}
586-
var transpiled = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".js"); });
586+
var transpiled = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".js") || endsWith(entry.name, ".jsx"); });
587587
var map$$1 = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".map"); });
588588
var dts = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".d.ts"); });
589589
return {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export default function typescript(options?: IOptions)
251251
this.error(colors.red(`failed to transpile '${id}'`));
252252
}
253253

254-
const transpiled = _.find(output.outputFiles, (entry) => _.endsWith(entry.name, ".js"));
254+
const transpiled = _.find(output.outputFiles, (entry) => _.endsWith(entry.name, ".js") || _.endsWith(entry.name, ".jsx"));
255255
const map = _.find(output.outputFiles, (entry) => _.endsWith(entry.name, ".map"));
256256
const dts = _.find(output.outputFiles, (entry) => _.endsWith(entry.name, ".d.ts"));
257257

0 commit comments

Comments
 (0)