Skip to content

refactor: use Rslib to build packages #1182

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 1 commit into from
Jul 22, 2025
Merged

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Jul 21, 2025

Summary

not finished yet, i found some wrong output in static-commonjs export format, which need to be fixed ahead.

i made a mistake, there was no bug, we could migrate some packages in this PR. @rsdoctor/core has a circular require and will be migrated in another separated PR.

Related Links

Copy link

netlify bot commented Jul 21, 2025

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit 7a6c3e0
🔍 Latest deploy log https://app.netlify.com/projects/rsdoctor/deploys/687f535f1eb40f00089b06f0
😎 Deploy Preview https://deploy-preview-1182--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 project configuration.

@fi3ework fi3ework force-pushed the rslib-2 branch 3 times, most recently from f416b68 to d03e521 Compare July 22, 2025 08:44
@fi3ework fi3ework marked this pull request as ready for review July 22, 2025 08:53
@Copilot Copilot AI review requested due to automatic review settings July 22, 2025 08:53
Copilot

This comment was marked as outdated.

@fi3ework fi3ework requested a review from Copilot July 22, 2025 08:54
Copy link

@Copilot 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 migrates the build system from Modern.js to Rslib across multiple packages in the RsDoctor monorepo. The migration involves updating build commands, replacing configuration files, and adjusting ESM output file extensions.

Key changes:

  • Replace Modern.js build tooling with Rslib across packages
  • Create new shared Rslib configuration in scripts/rslib.base.config.ts
  • Update ESM output file extensions from .js to .mjs for better module resolution

Reviewed Changes

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

Show a summary per file
File Description
scripts/rslib.base.config.ts Adds new shared Rslib build configuration with CommonJS and ESM format support
scripts/modern.base.config.ts Removes deprecated ESM configuration that's been migrated to Rslib
packages/*/package.json Updates build scripts from "modern build" to "rslib build" and adds @rslib/core dependency
packages/*/rslib.config.ts Adds Rslib configuration files replacing Modern.js configs
packages/*/modern.config.ts Removes old Modern.js configuration files
packages/utils/package.json Updates ESM export paths from .js to .mjs extensions
Comments suppressed due to low confidence (1)

packages/rspack-plugin/rslib.config.ts:3

  • [nitpick] The variable name 'rslibConfig' is redundant since this is already in an rslib config file. Consider renaming to 'config' for brevity.
const rslibConfig = {

@easy1090
Copy link
Contributor

The @modern-js/module-tools package in the root/package.json dependencies may be unnecessary and can possibly be removed.

@easy1090 easy1090 merged commit f6da9ec into web-infra-dev:main Jul 22, 2025
7 checks passed
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