Unverified Commit 477bdb92 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

TypeScript preset should always be enabled (#7137)

The preset handles file toggling itself, and actually changes behavior between `.ts` and `.tsx`.
parent 05e52544
......@@ -70,7 +70,8 @@ module.exports = (api: any, options: NextBabelPresetOptions = {}): BabelPreset =
// @babel/plugin-transform-react-jsx-self automatically in development
development: isDevelopment || isTest,
...options['preset-react']
}]
}],
require('@babel/preset-typescript')
],
plugins: [
require('babel-plugin-react-require'),
......@@ -92,14 +93,6 @@ module.exports = (api: any, options: NextBabelPresetOptions = {}): BabelPreset =
isProduction && [require('babel-plugin-transform-react-remove-prop-types'), {
removeImport: true
}]
].filter(Boolean),
overrides: [
{
test: /\.(tsx|ts)$/,
presets: [
require('@babel/preset-typescript')
]
}
]
].filter(Boolean)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment