Skip to content

Commit

Permalink
Enable TS in CRA (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves authored Oct 30, 2018
1 parent 73d9510 commit ef2ab92
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function initialize() {
let v2Initialized = false;
const preset = new Preset(
'create-react-app',
['web.js', 'js', 'json', 'web.jsx', 'jsx'],
['web.js', 'js', 'json', 'web.jsx', 'jsx', 'ts', 'tsx'],
{ 'react-native': 'react-native-web' },
{
hasDotEnv: true,
Expand Down Expand Up @@ -73,11 +73,12 @@ export default function initialize() {
},
],
'react',
'typescript',
],
},
};
preset.registerTranspiler(
module => /\.jsx?$/.test(module.path),
module => /\.(t|j)sx?$/.test(module.path),
[
{
transpiler: babelTranspiler,
Expand Down

0 comments on commit ef2ab92

Please sign in to comment.