In the above scenario, don't you still have to do an "import" in the script and components in the export default script?
I'm trying to avoid having to do an explicit import but still have the components generated dynamically with something like
computed: {
dynamicComponent () {
var x = this.compMe.trim().replace('components/', '')
return () => import(components/${x})
}
}
The problem is that since it's computed, it only ever gets the final component.
Any ideas?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In the above scenario, don't you still have to do an "import" in the script and components in the export default script?
I'm trying to avoid having to do an explicit import but still have the components generated dynamically with something like
computed: {
dynamicComponent () {
var x = this.compMe.trim().replace('components/', '')
return () => import(
components/${x}
)}
}
The problem is that since it's computed, it only ever gets the final component.
Any ideas?