# `PhoenixImportmap.Importmap`
[🔗](https://github.com/gilest/phoenix_importmap/blob/main/lib/phoenix_importmap/importmap.ex#L1)

Provides functions for working with importmaps.

# `t`

```elixir
@type t() :: %PhoenixImportmap.Importmap{imports: map()}
```

# `copy`

Copies importmap assets to `:copy_destination_path`.

# `filter`

Filters an importmap based on a given asset path.

Used to update only assets that have changed in file watching.

# `json`

Encodes an importmap into JSON.

# `prepare`

Maps local paths from the configured importmap to the location they are being served from.

- Strips `:public_asset_path_prefix` from asset paths so they may be resolved
by `Plug.Static`.
- Uses `YourAppWeb.Endpoint.static_path/1` to determine whether to use digest URLs.

---

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