Skip to content

Commit

Permalink
[draft] Use Babel to transpile JSX instead of TypeScript (#573)
Browse files Browse the repository at this point in the history
It seems like we're allowing TypeScript to transpile JSX, when we could be allowing Babel to do so. Having TypeScript pass-through JSX to babel would mean we only have to support it being configurable in one place.

(hoping this fixes #564)

Co-authored-by: Leah <me@hrmny.sh>
Co-authored-by: Leah <github.leah@hrmny.sh>
  • Loading branch information
3 people committed Jul 21, 2020
1 parent c87aaf0 commit 3a97f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ function createConfig(options, entry, format, writeMeta) {
sourceMap: options.sourcemap,
declaration: true,
declarationDir: getDeclarationDir({ options, pkg }),
jsx: 'react',
jsx: 'preserve',
jsxFactory:
// TypeScript fails to resolve Fragments when jsxFactory
// is set, even when it's the same as the default value.
Expand Down

0 comments on commit 3a97f50

Please sign in to comment.