Skip to content

Commit dbe1b7a

Browse files
authored
fix: integration test for babel-object-config (#7214)
1 parent ad449aa commit dbe1b7a

File tree

1 file changed

+2
-3
lines changed
  • packages/cli/uni-builder/src/webpack/plugins

1 file changed

+2
-3
lines changed

packages/cli/uni-builder/src/webpack/plugins/babel.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getBabelConfigForNode } from '@modern-js/babel-preset/node';
33
import { getBabelConfigForWeb } from '@modern-js/babel-preset/web';
44
import {
55
applyOptionsChain,
6-
isPlainObject,
6+
isObject,
77
isSupportAutomaticJsx,
88
} from '@modern-js/utils';
99
import { logger } from '@rsbuild/core';
@@ -128,11 +128,10 @@ export const pluginBabel = (
128128
{ removeImport: true },
129129
]);
130130
}
131-
132131
const babelConfig = applyOptionsChain(
133132
baseBabelConfig,
134133
// ensure that each environment has its own babel options(plugins, presets, etc.) in multi-environments.
135-
isPlainObject(options?.babelLoaderOptions)
134+
isObject(options?.babelLoaderOptions)
136135
? lodash.cloneDeep(options?.babelLoaderOptions)
137136
: options?.babelLoaderOptions,
138137
{

0 commit comments

Comments
 (0)