diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 1259fdf382c..f6caaa8b2d1 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -147,7 +147,7 @@ module.exports = { // https://github.com/facebook/create-react-app/issues/290 // `web` extension prefixes have been added for better support // for React Native Web. - extensions: ['.mjs', '.web.js', '.js', '.json', '.web.jsx', '.jsx'], + extensions: ['.mjs', '.web.js', '.js', '.ts', '.json', '.web.jsx', '.jsx', '.tsx'], alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 465ca01108d..10b768ae0b9 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -217,7 +217,7 @@ module.exports = { // https://github.com/facebook/create-react-app/issues/290 // `web` extension prefixes have been added for better support // for React Native Web. - extensions: ['.mjs', '.web.js', '.js', '.json', '.web.jsx', '.jsx'], + extensions: ['.mjs', '.web.js', '.js', '.ts', '.json', '.web.jsx', '.jsx', '.tsx'], alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/