Skip to content

fix(build): exclude client-v2 directory from deleteServerFiles#9446

Open
algojogacor wants to merge 1 commit into
nocobase:mainfrom
algojogacor:fix/delete-server-files-client-v2
Open

fix(build): exclude client-v2 directory from deleteServerFiles#9446
algojogacor wants to merge 1 commit into
nocobase:mainfrom
algojogacor:fix/delete-server-files-client-v2

Conversation

@algojogacor
Copy link
Copy Markdown

This is a ...

  • New feature
  • Improvement
  • Bug fix
  • Others

Motivation

The deleteServerFiles function silently deletes the client-v2 build artifact on all platforms, causing runtime 404 errors for plugins that depend on the client-v2 lane.

Description

The dirs glob pattern in deleteServerFiles already excludes client and node_modules directories from cleanup, but was missing client-v2. This one-line fix adds '!client-v2' to the glob exclusion list, matching the existing pattern for client.

Root cause: When deleteServerFiles runs after buildPluginClient('client-v2') completes, fast-glob enumerates the dist/ directory and the client-v2 directory (not excluded) gets passed to fs.removeSync().

Related issues

Fixes #9316

Changelog

Language Changelog
🇺🇸 English Fixed deleteServerFiles to preserve client-v2 build output by adding it to the glob exclusion list.
🇨🇳 Chinese

Checklists

  • All changes have been self-tested and work as expected
  • Test cases are updated/provided or not needed
  • Doc is updated/provided or not needed
  • Component demo is updated/provided or not needed
  • Changelog is provided or not needed
  • Request a code review if it is necessary

The deleteServerFiles function uses fast-glob to enumerate build output
directories for cleanup. The '!client' exclusion pattern prevents the client
directory from being deleted, but '!client-v2' was missing. On all platforms,
the client-v2 build artifact was being silently deleted after compilation,
causing runtime 404 errors for plugins that depend on the client-v2 lane.

Fixes nocobase#9316
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 12, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]client-v2 Build Artifact Missing on Windows — deleteServerFiles() Path Separator Bug

2 participants