diff --git a/.changeset/breezy-baboons-jump.md b/.changeset/breezy-baboons-jump.md new file mode 100644 index 0000000000..2de76a8cbd --- /dev/null +++ b/.changeset/breezy-baboons-jump.md @@ -0,0 +1,5 @@ +--- +'@rsbuild/shared': patch +--- + +release: 0.6.15 diff --git a/packages/shared/src/chain.ts b/packages/shared/src/chain.ts index c673a82ee1..324d92432d 100644 --- a/packages/shared/src/chain.ts +++ b/packages/shared/src/chain.ts @@ -267,7 +267,7 @@ export function applyScriptCondition({ const target = castArray(chain.get('target')); const legacyTarget = ['es5', 'es6', 'es2015', 'es2016']; if (legacyTarget.some((item) => target.includes(item))) { - rule.include.add(/[\\/]@rsbuild[\\/]core[\\/]/); + rule.include.add(/[\\/]@rsbuild[\\/]core[\\/]dist[\\/]/); } for (const condition of [...includes, ...(config.source.include || [])]) {