fix decorators not properly working

This commit is contained in:
Barry Gitarts 2019-01-17 12:15:17 -05:00
parent 22526b59ce
commit 2bc3e5fd34

View File

@ -220,13 +220,13 @@ const baseBabelLoader = base.module.rules[3];
// -----------------------------------------------------------------------------
// should be false in configs that have isTypeScriptEnabled = true
const isFlowEnabled = !embarkPipeline.typescript;
if (isFlowEnabled) {
// position @babel/plugin-transform-flow-strip-types per babel-preset-react-app
baseBabelLoader.options.plugins.unshift(
requireFromEmbark.resolve('@babel/plugin-transform-flow-strip-types')
);
}
// const isFlowEnabled = !embarkPipeline.typescript;
// if (isFlowEnabled) {
// // position @babel/plugin-transform-flow-strip-types per babel-preset-react-app
// baseBabelLoader.options.plugins.unshift(
// requireFromEmbark.resolve('@babel/plugin-transform-flow-strip-types')
// );
// }
// TypeScript
// -----------------------------------------------------------------------------
@ -244,9 +244,9 @@ if (isTypeScriptEnabled) {
base.resolve.extensions.push('.ts', '.tsx');
}
if (isFlowEnabled && isTypeScriptEnabled) {
throw new Error('isFlowEnabled and isTypeScriptEnabled cannot both be true');
}
// if (isFlowEnabled && isTypeScriptEnabled) {
// throw new Error('isFlowEnabled and isTypeScriptEnabled cannot both be true');
// }
// development config
// -----------------------------------------------------------------------------