babel-loader should process .ts, .tsx files when typescript is enabled

This commit is contained in:
Michael Bradley, Jr 2018-10-02 13:03:19 -05:00 committed by Pascal Precht
parent 059635979d
commit 67347ae08e
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D

View File

@ -213,6 +213,7 @@ if (isTypeScriptEnabled) {
require.resolve('@babel/preset-typescript') require.resolve('@babel/preset-typescript')
); );
// additional extensions // additional extensions
baseBabelLoader.test = /\.(js|ts)x?$/;
base.resolve.extensions.push('.ts', '.tsx'); base.resolve.extensions.push('.ts', '.tsx');
} }