-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
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:
vuepress/packages/@vuepress/core/lib/prepare/AppContext.js
Lines 120 to 125 in ace3aec
.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
Labels
No labels