For AI agents: the complete documentation index is available at https://mfdoctor.kevinbeier.com/1.0.0/de/llms.txt, the full documentation bundle is available at https://mfdoctor.kevinbeier.com/1.0.0/de/llms-full.txt, and this page is available as Markdown at https://mfdoctor.kevinbeier.com/1.0.0/de/rules/vite/remotes-prefer-module.md.

Dies ist die deutsche MFDoctor-Dokumentation. Technische Bezeichner, CLI-Flags, Regel-IDs und Codebeispiele bleiben unverändert, damit die Inhalte zwischen den Sprachen vollständig kompatibel bleiben. Verwenden Sie den Sprachumschalter für die kanonische englische Fassung.

vite/remotes-prefer-module

  • Kategorie: correctness
  • Standardschweregrad: warning

Problem

Vite string remotes and missing/var type default to script-style loading. Vite↔Vite ESM remotes need explicit type: 'module'; mixed bundlers should declare an explicit non-default type (for example global) or document a varFilename producer interop path.

So beheben Sie das Problem

Prefer object remotes with type: 'module' for Vite↔Vite ESM. For webpack/rspack remotes, set an explicit type such as global, or keep varFilename when this app intentionally emits a var entry for var hosts.

Suppress or retarget with rules["vite/remotes-prefer-module"] set to "off" or a severity — see Suppressions and allowlists.

Quellen