Skip to content

fix(server): handle Deno compatibility in public dir copy#5852

Merged
chenjiahan merged 1 commit intomainfrom
deno_cp_issue_0815
Aug 15, 2025
Merged

fix(server): handle Deno compatibility in public dir copy#5852
chenjiahan merged 1 commit intomainfrom
deno_cp_issue_0815

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Fix the issue where it fails to copy the public directory when running in Deno by first removing the existing directory, if present.

Also improve the clarity of the error message.

Related Links

resolve #5804

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 15, 2025 07:24
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 15, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit c4855e8
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/689ee0b56476d40008af5732
😎 Deploy Preview https://deploy-preview-5852--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 64 (🔴 down 20 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a Deno compatibility issue where copying the public directory fails by adding a workaround to remove existing directories before copying. It also improves error message clarity.

  • Adds Deno detection constant and conditional directory removal before copying
  • Updates error message to be more descriptive and user-friendly

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/core/src/constants.ts Adds isDeno boolean constant for runtime detection
packages/core/src/plugins/server.ts Implements Deno-specific workaround and improves error messaging

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chenjiahan chenjiahan merged commit 9dabaa5 into main Aug 15, 2025
11 checks passed
@chenjiahan chenjiahan deleted the deno_cp_issue_0815 branch August 15, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Running rsbuild build twice with Deno moves /public folder into /public subdirectory in dist

2 participants