chakra-ui / chakra-loader

Chakra UI Vue webpack loader for auto-import and registration of Chakra components
13 stars 3 forks source link

Support for @nuxt/content global registration #9

Open JessicaSachs opened 4 years ago

JessicaSachs commented 4 years ago

Is your feature request related to a problem? Please describe. I want to register global components from Chakra so I can use them in markdown files w/ @nuxt/content. For this to work, they have to be globally registered. Right now, I have to manually import and then register all of the components I want to use in my markdown files.

Describe the solution you'd like I want to globally register Chakra components without listing them all out. Tree-shaking is not a requirement, but would be nice.

If Chakra either:

That would solve my problem.

codebender828 commented 4 years ago

Hey @JessicaSachs ! Thanks for the suggestion with this! Theoretically I think it's possible. 🤔.

For this, I may need to examine how vue-loader is transforming the SFCs for globally registered components to implement something like this. I'll also look into @nuxt/components component library API to see what it can offer as well.