[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow-ui](../../README) / [registry](../README) / rewriteImports

# Function: rewriteImports()

> **rewriteImports**(`source`): `string`

Defined in: [flow-ui/src/registry.ts:208](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow-ui/src/registry.ts#L208)

Rewrite a component's util imports for the copy-in layout: `../utils/x.ts`
(the package layout) → `./lib/x.ts` (the app's UI dir layout). Idempotent and
a no-op for util files themselves (gva → `./cn.ts` stays a valid sibling import).

## Parameters

### source

`string`

## Returns

`string`
