Skip to content

Commit

Permalink
Enable TS in CRA (codesandbox#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves authored and SaraVieira committed Nov 23, 2018
1 parent a21ad37 commit 60533bc
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 60533bc

Please sign in to comment.