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:
- create
setup/main.ts - Copy definition of
v-markand change the name for the directive. - Add plugin using
app.use - Start slidev and see error in browser console.
- Resave
main.ts
Environment
- Slidev version: v52.16.0
- Browser: Chrome
- OS: MacOS
Source: slidevjs/slidev