mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
TypeScript support -- disabled by default
This commit is contained in:
parent
8c6b26f311
commit
4aedeeee9b
@ -201,6 +201,21 @@ if (isFlowEnabled) {
|
||||
);
|
||||
}
|
||||
|
||||
// TypeScript
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// should be false in configs that have isFlowEnabled = true
|
||||
const isTypeScriptEnabled = false;
|
||||
if (isTypeScriptEnabled) {
|
||||
// position @babel/preset-typescript as the last preset (runs first)
|
||||
// see: https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/
|
||||
baseBabelLoader.options.presets.push(
|
||||
require.resolve('@babel/preset-typescript')
|
||||
);
|
||||
// additional extensions
|
||||
base.resolve.extensions.push('.ts', '.tsx');
|
||||
}
|
||||
|
||||
// development config
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user