Skip to content

Scaffolding for a vue plugin on npm #565

Open
@luckydonald

Description

Please describe

Currently it's unclear how to setup and configure a repo to write a plugin for vue, i.e. a custom component to import from npm

Additional context

It would be great to have a generator for that, i.e. with

npm create vue@latest --plugin

or similar.

Activity

luckydonald

luckydonald commented on Sep 6, 2024

@luckydonald
Author

I've seen https://vuejs.org/guide/reusability/plugins.html, but this is not covering how to have that plugin prepared to be a standalone (external) file (package.json, etc.), only the vue file(s) itself.

changed the title Scaffolding for a npm plugin Scaffolding for a vue plugin on npm on Sep 6, 2024
Yordan-Ramchev

Yordan-Ramchev commented on Sep 6, 2024

@Yordan-Ramchev
Contributor

@luckydonald You need Vite to create a bundle, here is a link https://vitejs.dev/guide/build.html#library-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @luckydonald@Yordan-Ramchev

      Issue actions

        Scaffolding for a vue plugin on npm · Issue #565 · vuejs/create-vue