Skip to content

Interface: ResolvedId

Extends

Properties

description?

  • Type: string
  • Optional

A short, human-readable description of the module.

This is useful for virtual modules, whose ids (e.g. \0vite/modulepreload-polyfill.js) do not convey their purpose on their own.

Example

js
function polyfillPlugin() {
  return {
    name: 'vite:modulepreload-polyfill',
     load: {
       filter: { id: /^\0vite/modulepreload-polyfill\.js$/ },
       handler(id) {
         return {
           code: '',
           description: 'A polyfill for `link` tag with `rel="modulepreload"`',
         };
       }
     },
  };
}

Inherited from

ModuleOptions.description


external

  • Type: boolean | "absolute"

id

  • Type: string

invalidate?

  • Type: boolean
  • Optional

Inherited from

ModuleOptions.invalidate


meta

See Custom module meta-data section for more details.

Inherited from

ModuleOptions.meta


moduleSideEffects

  • Type: ModuleSideEffects

Inherited from

ModuleOptions.moduleSideEffects


packageJsonPath?

  • Type: string
  • Optional

Inherited from

ModuleOptions.packageJsonPath

Was this page helpful?