#2673·slidev

Unable to add new directives in `setup/main.ts`

Author: GitSparTVCreated Jul 15, 2026Updated Jul 15, 2026
Labelspending triage

Describe the bug

I've added a copy of v-mark with different name and added it in main.ts and app.use. Cold start shows an error: [Vue warn]: Failed to resolve directive: instantmark. If I resave the file, the component starts to work without errors.

Minimal reproduction

Steps to reproduce the behavior:

  1. create setup/main.ts
  2. Copy definition of v-mark and change the name for the directive.
  3. Add plugin using app.use
  4. Start slidev and see error in browser console.
  5. Resave main.ts

Environment

  • Slidev version: v52.16.0
  • Browser: Chrome
  • OS: MacOS