From 29f9a957a0aa7a6426f031a40a0bfbf7124df0d4 Mon Sep 17 00:00:00 2001 From: Dilan Date: Fri, 1 Jul 2022 16:47:55 -0500 Subject: [PATCH] fix babel config --- package.json | 2 +- src/lib/features/webpack/babel.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a55fa132..69bcc10a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@craco/craco", "description": "Create React App Configuration Override, an easy and comprehensible configuration layer for create-react-app.", - "version": "7.0.0-alpha.6", + "version": "7.0.0-alpha.7", "scripts": { "prepublishOnly": "tsc", "test": "jest" diff --git a/src/lib/features/webpack/babel.ts b/src/lib/features/webpack/babel.ts index 57b153cd..f4b8dfb5 100644 --- a/src/lib/features/webpack/babel.ts +++ b/src/lib/features/webpack/babel.ts @@ -82,10 +82,10 @@ function applyLoaderOptions( function overrideLoader( match: CompleteLoader, - babelConfig: CracoBabelConfig, + cracoConfig: CracoConfig, context: BaseContext ) { - const { presets, plugins, loaderOptions } = babelConfig; + const { presets, plugins, loaderOptions } = cracoConfig.babel ?? {}; if (presets) { addPresets(match.loader, presets);