From 8d697d2378154bc2e4e453e6cf9618336f5d16c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BF=9E=E5=8F=AF=20=C2=B7=20YU=20KE?= <1798456934@qq.com> Date: Mon, 31 Aug 2026 10:33:12 +0800 Subject: [PATCH] docs: update global loading plugin references (#8331) --- docs/src/en/guide/in-depth/loading.md | 4 +++- docs/src/guide/in-depth/loading.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/src/en/guide/in-depth/loading.md b/docs/src/en/guide/in-depth/loading.md index e0706cf56..b24697f80 100644 --- a/docs/src/en/guide/in-depth/loading.md +++ b/docs/src/en/guide/in-depth/loading.md @@ -6,7 +6,7 @@ Global loading refers to the loading effect that appears when the page is refres ## Principle -Implemented by the `vite-plugin-inject-app-loading` plugin, the plugin injects a global `loading html` into each application. +The built-in `inject-app-loading` plugin implements this behavior. Its source is in `internal/vite-config/src/plugins/inject-app-loading`, and it injects global loading HTML into each application. ## Disable @@ -20,6 +20,8 @@ VITE_INJECT_APP_LOADING=false If you want to customize the global loading, you can create a `loading.html` file in the application directory, at the same level as `index.html`. The plugin will automatically read and inject this HTML. You can define the style and animation of this HTML as you wish. +The built-in default template is available at `internal/vite-config/src/plugins/inject-app-loading/default-loading.html` for reference. + ::: tip - You can use the same syntax as in `index.html`, such as the `VITE_APP_TITLE` variable, to get the application's title. diff --git a/docs/src/guide/in-depth/loading.md b/docs/src/guide/in-depth/loading.md index 4e1ae8f7b..63daa15f2 100644 --- a/docs/src/guide/in-depth/loading.md +++ b/docs/src/guide/in-depth/loading.md @@ -6,7 +6,7 @@ ## 原理 -由 `vite-plugin-inject-app-loading` 插件实现,插件会在每个应用都注入一个全局的 `loading html`。 +由项目内置的 `inject-app-loading` 插件实现。源码位于 `internal/vite-config/src/plugins/inject-app-loading`,插件会在每个应用中注入全局 `loading HTML`。 ## 关闭 @@ -20,6 +20,8 @@ VITE_INJECT_APP_LOADING=false 如果你想要自定义全局 loading,可以在应用目录下,与`index.html`同级,创建一个`loading.html`文件,插件会自动读取并注入。这个html可以自行定义样式和动画。 +项目内置的默认模板位于 `internal/vite-config/src/plugins/inject-app-loading/default-loading.html`,可作为自定义参考。 + ::: tip - 你可以使用跟`index.html`一样的语法,比如`VITE_APP_TITLE`变量,来获取应用的标题。