mirror of https://github.com/embarklabs/embark.git
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…
Reference in New Issue