You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add SFC path to resolver arguments (ie. relative component matching in custom resolver, etc) #802
It would be useful to pass the SFC's path to the resolver functions, currently only the extracted name of the component is passed. With the SFC path you could implement a custom resolver that matches components relative to the component that is using it, allowing importing of non-global components.
Suggested solution
Pass sfcPath to "findComponent" and then through to resolver arguments so that resolver can use this information programmatically in resolver.
functionresolver(name,sfcPath){ ... }// Or passing meta/ctx object to support other information in the futurefunctionresolver(name,ctx){const{ sfcPath }=ctx;// Do something with path information}
Alternative
No response
Additional context
Recently I built a Vue application (SSG pre-rendered) that has many pages with unique layouts/content offerings. This would make it so that the pages themselves can stay cleaner (no imports) which is helpful for non Vue developers who are working on content. This way they can create page sections as (components/vue markdown files) and use them directly in the page without the overhead of importing each
Activity