From 388adf5a7e9fa16b5d5431773457c038fc5b6621 Mon Sep 17 00:00:00 2001 From: Spacey Date: Sun, 11 Dec 2022 10:37:05 +0200 Subject: [PATCH] docs: add client types hint in static assets guide (#11305) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: add client types hint in static assets guide * chore: tweak Co-authored-by: 翠 / green --- docs/guide/assets.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guide/assets.md b/docs/guide/assets.md index c0dba49a604f80..dff926f2c2da31 100644 --- a/docs/guide/assets.md +++ b/docs/guide/assets.md @@ -28,6 +28,8 @@ The behavior is similar to webpack's `file-loader`. The difference is that the i - Git LFS placeholders are automatically excluded from inlining because they do not contain the content of the file they represent. To get inlining, make sure to download the file contents via Git LFS before building. +- TypeScript, by default, does not recognize static asset imports as valid modules. To fix this, include [`vite/client`](./features#client-types). + ### Explicit URL Imports Assets that are not included in the internal list or in `assetsInclude`, can be explicitly imported as a URL using the `?url` suffix. This is useful, for example, to import [Houdini Paint Worklets](https://houdini.how/usage).