Skip to content

Commit

Permalink
fix(babel): presetEnv need allow null value (#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
zllkjc authored Jan 5, 2024
1 parent 2fe6224 commit 2dd7d5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/famous-penguins-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rsbuild/babel-preset': patch
---

fix: presetEnv need allow null value
fix: presetEnv 需要允许传入空值
2 changes: 1 addition & 1 deletion packages/babel-preset/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const getBabelConfigForWeb = (options: WebPresetOptions) => {
{
presetEnv: {
bugfixes: true,
corejs: options.presetEnv.useBuiltIns
corejs: options.presetEnv?.useBuiltIns
? {
version: getCoreJsVersion(
require.resolve('core-js/package.json'),
Expand Down

0 comments on commit 2dd7d5e

Please sign in to comment.