Skip to content

Commit

Permalink
- #23, fix for jsx: preserve option
Browse files Browse the repository at this point in the history
  • Loading branch information
ezolenko committed Jul 5, 2017
1 parent 733337f commit 904f339
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.cjs.js
Expand Up @@ -577,7 +577,7 @@ function typescript(options) {
if (_.isFunction(_this.error))
_this.error(colors.red("failed to transpile '" + id + "'"));
}
var transpiled = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".js"); });
var transpiled = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".js") || _.endsWith(entry.name, ".jsx"); });
var map$$1 = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".map"); });
var dts = _.find(output.outputFiles, function (entry) { return _.endsWith(entry.name, ".d.ts"); });
return {
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.es.js
Expand Up @@ -583,7 +583,7 @@ function typescript(options) {
if (isFunction(_this.error))
_this.error(red("failed to transpile '" + id + "'"));
}
var transpiled = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".js"); });
var transpiled = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".js") || endsWith(entry.name, ".jsx"); });
var map$$1 = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".map"); });
var dts = find(output.outputFiles, function (entry) { return endsWith(entry.name, ".d.ts"); });
return {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -251,7 +251,7 @@ export default function typescript(options?: IOptions)
this.error(colors.red(`failed to transpile '${id}'`));
}

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

Expand Down

0 comments on commit 904f339

Please sign in to comment.