Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Nov 28, 2024
1 parent 78e828e commit afd591e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/guide/essentials/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ img.src = imageUrl;

:::

:::warning
Assets in the `public/` directory are **_not_** accessible in content scripts by default. To use a public asset in a content script, you must add it to your manifest's [`web_accessible_resources` array](/api/reference/wxt/type-aliases/UserManifest#web-accessible-resources).
:::

## Inside Content Scripts

Assets inside content scripts are a little different. By default, when you import an asset, it returns just the path to the asset. This is because Vite assumes you're loading assets from the same hostname.
Expand Down

0 comments on commit afd591e

Please sign in to comment.