Skip to content

Unable to add new directives in setup/main.ts #2673

Description

@GitSparTV

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions