From 21dd28dd648b6d043eaad2f31efdd379e5134635 Mon Sep 17 00:00:00 2001 From: patak Date: Wed, 3 May 2023 10:29:51 +0200 Subject: [PATCH] docs: document /index.html as importer during dev (#12911) Co-authored-by: Bjorn Lu --- docs/guide/api-plugin.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index d5f92bad9ad879..ebcdade803e2ea 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -159,7 +159,9 @@ The following hooks are called on each incoming module request: - [`load`](https://rollupjs.org/plugin-development/#load) - [`transform`](https://rollupjs.org/plugin-development/#transform) -They also have an extended `options` parameter with additional Vite-specific properties. You can read more in the [SSR documentation](/guide/ssr#ssr-specific-plugin-logic). +These hooks also have an extended `options` parameter with additional Vite-specific properties. You can read more in the [SSR documentation](/guide/ssr#ssr-specific-plugin-logic). + +Some `resolveId` calls' `importer` value may be an absolute path for a generic `index.html` at root as it's not always possible to derive the actual importer due to Vite's unbundled dev server pattern. For imports handled within Vite's resolve pipeline, the importer can be tracked during the import analysis phase, providing the correct `importer` value. The following hooks are called when the server is closed: