Skip to content

core: Optimize Client Development Experience #1010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

quanquan2100
Copy link
Contributor

Summary

Background

While developing the Client, I encountered an issue affecting the development experience - the development version code was being bundled and minified. This led to efficiency problems.
For example, I couldn't view component names through the React dev tools plugin, and it was difficult to locate target files.

CleanShot 2025-04-11 at 13 40 24@2x

Here is my dev workflow:

  • Startup:
    1. Launch an examples project, such as the build:analysis command for rspress-minimal
    2. Sequentially start the start commands for packages/client and packages/components
  • Development:
    1. Local file changes trigger repackaging of the package
    2. Wait for packaging to complete before refreshing the browser to see effects

Solution

  1. packages/components uses modernjs for bundling, with sourcemap config added
  2. packages/client uses rsbuild for building, through add NODE_ENV=development environment variable to the script start to trigger development mode
  3. Since client rebundles the components content, through add source-map-loader to ensure components code can be properly restored

old:
CleanShot 2025-04-11 at 13 40 24@2x
new:
CleanShot 2025-04-11 at 13 31 42@2x

Copy link

netlify bot commented Apr 11, 2025

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit 7fca1aa
🔍 Latest deploy log https://app.netlify.com/sites/rsdoctor/deploys/67f8b3f3b3e16b00084d214e
😎 Deploy Preview https://deploy-preview-1010--rsdoctor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@quanquan2100 quanquan2100 changed the title Optimize Client Development Experience core: Optimize Client Development Experience Apr 11, 2025
@easy1090
Copy link
Contributor

👍

@easy1090 easy1090 merged commit 02e6cc4 into web-infra-dev:main Apr 11, 2025
9 checks passed
@easy1090 easy1090 mentioned this pull request Apr 17, 2025
@easy1090 easy1090 mentioned this pull request May 6, 2025
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy