Skip to content

Commit

Permalink
Add @babel/preset-typescript to all babel.config.js overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Jul 13, 2021
1 parent 40741ec commit 6bab64c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@ module.exports = api => {
((!filename.includes('no-babel') &&
needsBabelPluginEmotion(filename)) ||
filename.includes(path.join('__tests__', 'babel'))),
presets: [[emotionDevPreset, { useEmotionPlugin: true }]]
presets: [
[emotionDevPreset, { useEmotionPlugin: true }],
'@babel/preset-typescript'
]
},
{
test: filename =>
filename &&
filename.includes('source-map') &&
needsBabelPluginEmotion(filename),
presets: [
[emotionDevPreset, { useEmotionPlugin: true, sourceMap: true }]
[
emotionDevPreset,
{ useEmotionPlugin: true, sourceMap: true },
'@babel/preset-typescript'
]
]
},
{
Expand All @@ -35,7 +42,11 @@ module.exports = api => {
isTestFile(filename) &&
filename.includes('automatic-runtime'),
presets: [
[emotionDevPreset, { runtime: 'automatic', useEmotionPlugin: true }]
[
emotionDevPreset,
{ runtime: 'automatic', useEmotionPlugin: true },
'@babel/preset-typescript'
]
]
},
{
Expand All @@ -46,7 +57,8 @@ module.exports = api => {
presets: [
[
emotionDevPreset,
{ runtime: 'automatic', development: true, useEmotionPlugin: true }
{ runtime: 'automatic', development: true, useEmotionPlugin: true },
'@babel/preset-typescript'
]
]
}
Expand Down

0 comments on commit 6bab64c

Please sign in to comment.