From 3ffcb183449efcc2aa1cf22d945945a0e94ce7ed Mon Sep 17 00:00:00 2001 From: Onildo Luciano Ferraz Date: Mon, 2 Dec 2024 06:05:36 -0300 Subject: [PATCH] docs(assets): update static asset URL transformation in dev (#18842) --- docs/guide/assets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/assets.md b/docs/guide/assets.md index f40896e89e2b35..93f2a097a6c60a 100644 --- a/docs/guide/assets.md +++ b/docs/guide/assets.md @@ -14,7 +14,7 @@ import imgUrl from './img.png' document.getElementById('hero-img').src = imgUrl ``` -For example, `imgUrl` will be `/img.png` during development, and become `/assets/img.2d8efhg.png` in the production build. +For example, `imgUrl` will be `/src/img.png` during development, and become `/assets/img.2d8efhg.png` in the production build. The behavior is similar to webpack's `file-loader`. The difference is that the import can be either using absolute public paths (based on project root during dev) or relative paths.