Do you want to work on this issue?
You can request for a bounty in order to promote it!
Global components #515
krmax44 posted onGitHub
<!-- Please don't delete this template or we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of Saber. -->
Feature request
Allow the user to register components globally, without digging in configs.
<!-- Please ask questions via following several ways. -->
<!-- https://chat.saber.land/ -->
<!-- https://stackoverflow.com/questions/ask?tags=saberjs -->
What problem does this feature solve?
When using components like <warning-message>Heads up!</warning-message>
oftenly throughout Markdown, it becomes repetetive to add a script block that imports and registers the component.
What does the proposed API look like?
š¦ current working directory
ā£ š theme
ā£ š components
ā£ š global
ā£ š myGlobalThemeComponent.vue
ā£ š pages
ā£ š components
ā£ š myGlobalComponent.vue
Maybe also configurable:
build:
globalComponents: false # disable it alltogether
globalComponents: # all Vue files in these folders will be loaded as global components
- components/
- theme/foo-bar/
How should this be implemented in your opinion?
Probably as core functionality, possibly as a plugin if desired.
Are you willing to work on this yourself?
Yes.