# asset_import_form

> An asset is imported or re-exported by a form other than its default binding.

An asset is imported or re-exported by a form other than its default binding.

| | |
| --- | --- |
| Kind | Build or validation problem |
| Reported by | Archive and source validation |
| `disko` exit code | 1 (problems) |

Assets can only be imported through their default binding. Named, namespace
and side-effect imports of an asset, and `export *` from an asset, are
rejected.

## Wrong

```ts title="src/main.ts"
import * as puck from "./art/puck.png";
import "./sounds/goal.ogg";
```

## Right

```ts title="src/main.ts"
import puck from "./art/puck.png";
import goal from "./sounds/goal.ogg";
```

Re-exporting is allowed as `export { default } from "./art/puck.png"` or
`export { default as puck } from "./art/puck.png"`.

## See also

- [Assets](/games/assets)
