← All recipes
Moderne licensed

Migrate .p-fluid to <p-fluid> wrapper

Recipe IDorg.openrewrite.primeng.MigratePFluidToWrapperArtifact@openrewrite/recipes-angular

Rewrites <div class="…p-fluid…">…</div> to <p-fluid class="…">…</p-fluid> and adds a FluidModule import from primeng/fluid to the corresponding component file. PrimeNG 18 removed the .p-fluid CSS class; the <p-fluid> wrapper component is its replacement.

Composite recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.primeng.MigratePFluidToWrapper

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular

Definition

This recipe runs the following recipes in order.

  • Rewrite .p-fluid divs to <p-fluid> wrappersorg.openrewrite.primeng.MigratePFluidToWrapper.html
  • Add FluidModule import to components using <p-fluid>org.openrewrite.primeng.MigratePFluidToWrapper.add-imports