# `mix phoenix_kit.assets.rebuild`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.111/lib/mix/tasks/phoenix_kit.assets.rebuild.ex#L1)

Rebuilds assets for PhoenixKit using standard Phoenix asset pipeline.

This task rebuilds assets using the Phoenix asset build system by trying
multiple commands in order of preference:

1. `mix assets.build` - Phoenix 1.8+ standard asset pipeline
2. `mix esbuild` and `mix tailwind` - Individual asset builders
3. `npm run build` - NPM build script fallback

## Usage

    $ mix phoenix_kit.assets.rebuild
    $ mix phoenix_kit.assets.rebuild --check
    $ mix phoenix_kit.assets.rebuild --force

## Options

  * `--check` - Only check if rebuild is needed, don't execute
  * `--force` - Force rebuild even if not detected as needed
  * `--verbose` - Show detailed output during process (default: true)
  * `--silent` - Suppress all output except errors

## When to use

This task is automatically called by:
- `mix phoenix_kit.install` (after successful installation)
- `mix phoenix_kit.update` (after successful update, unless --skip-assets)

You may need to run it manually when:
- CSS integration was manually modified
- Tailwind/daisyUI configuration was changed
- PhoenixKit assets are not displaying correctly
- After updating Phoenix asset configuration

## Examples

    # Check if rebuild is needed
    mix phoenix_kit.assets.rebuild --check

    # Force rebuild all assets
    mix phoenix_kit.assets.rebuild --force

    # Silent rebuild (only show errors)
    mix phoenix_kit.assets.rebuild --silent

## Asset Build Pipeline

This task uses the standard Phoenix asset pipeline to ensure compatibility
with your application's build process. It automatically detects and uses
the appropriate build commands available in your project.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
