Skip to content

Migrate build config to rslib #1197

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Migrate build config to rslib #1197

wants to merge 1 commit into from

Conversation

pplancq
Copy link
Contributor

@pplancq pplancq commented May 14, 2025

This PR updates the build process for both React and CSS packages:

  • Migrated React packages from tsc to rslib.
    Advantage: Build files now use explicit import extensions.
  • Migrated CSS packages from postcss to rslib (with the Sass plugin).
    Advantage: The rslib Sass plugin uses the modern API, so there are no more warnings.

This improves consistency and modernizes the build pipeline across the monorepo.

@pplancq pplancq self-assigned this May 14, 2025
@pplancq pplancq added the chore Issue link to publishing, etc label May 14, 2025
@pplancq pplancq force-pushed the feature/build-packages branch from 42ef5f4 to 1e6d2dd Compare May 15, 2025 06:38
Copy link

fffan64
fffan64 previously approved these changes May 15, 2025
Copy link
Contributor

@JLou JLou left a comment

Choose a reason for hiding this comment

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

Je met une review bloquante pour eviter que ce soit mergé avant d'etre discuté

import { defineConfig } from "@rslib/core";
import { join } from "path";

export default defineConfig({
Copy link
Contributor

Choose a reason for hiding this comment

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

on ne pouvait pas faire du partage de config ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Je pense que oui mais comme on ne l'avait pas faire pour vitest et tsconfig je me suis dit que c'était pas utile ici.

postcssPresetEnv({
stage: 4,
}),
postcssNormalize,
Copy link
Contributor

Choose a reason for hiding this comment

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

pourquoi on supprime cssnano ?

Copy link
Contributor

Choose a reason for hiding this comment

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

on est sûr que rsbuild optimise mieux ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alors j'ai supprimé cssnano car rslib n'en tenais pas compte, du coup j'ai activé la minification de rslib mais j'ai pas regarder si l'opti été mieux ou pas pour moi elle semble équivalente.
Rslib utilise dernière Lightning CSS pour faire la minification du css qui est une lib plutôt réputer donc sa doit être bon.

soource:
https://rsbuild.dev/config/output/minify
https://rsbuild.dev/guide/styling/css-usage#lightning-css
https://lightningcss.dev/
https://www.npmjs.com/package/lightningcss

@pplancq pplancq dismissed stale reviews from GuillaumeKESTEMAN and fffan64 via 822ae5b June 17, 2025 11:56
@pplancq pplancq force-pushed the feature/build-packages branch from 1e6d2dd to 822ae5b Compare June 17, 2025 11:56
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue link to publishing, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants