Skip to content

Suggest not to register themePath/components by default #877

@meteorlxy

Description

@meteorlxy

Feature request

For version: 1.0.0-alpha.1

What problem does this feature solve?

All .vue files in themePath/components are registerd as global components by default:

.use('@vuepress/register-components', {
componentsDir: [
path.resolve(this.sourceDir, '.vuepress/components'),
path.resolve(this.themePath, 'components')
]
})

Theme makers may not want to register global components, but still want to have a components dir in the root path of their theme. (As I did in my own theme based on vuepress@0.x)

How should this be implemented in your opinion?

In my opinion, theme makers should use @vuepress/plugin-register-components themselves to control global components registration.

So I propose to remove line 123 above, i.e path.resolve(this.themePath, 'components'), and use another @vuepress/plugin-register-components in @vuepress/theme-default.

Are you willing to work on this yourself?**

Yes if admitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions