Skip to content

Option to emit component name based on file name with an NODE_ENV check for Vite + Vue based libraries #36

@segevfiner

Description

@segevfiner

Related plugins

Description

When building a Vue component library using Vite and this plugin. Component names are not emitted into productions builds of the library. This hinders debugging using the Vue devtools when using such libraries as all components from the library will show as anonymous component.

Suggested solution

Add an option to keep component names in production build gated behind a NODE_ENV check so that they can be stripped during bundling, that way they can be kept when using a library in development mode.

Alternative

Do this manually in each and every Vue file in the library.

Additional context

Hit this with @tiptap/vue-3 but also with our own custom Vite + Vue based libraries.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions