I have dynamic component called like this:
<component v-bind:is="loaderComponent" />
Then in my export default:
export default {
components: {
'loader': () => import(Vue.prototype.$VUE_LOADER_CONFIG.componentUrl)
}
},
computed: {
loaderComponent: function () {
console.log('1', Vue.prototype.$VUE_LOADER_CONFIG.componentUrl)
return 'loader'
}
}
That one console.log gives me the right path to the component, but it doesnt work, i need to pass the string instead of this variable to the import function to make this works.
import('../../Loaders/SomeLoader')
I get an error:
Vue warn]: Failed to resolve async component: function loader() {
return __webpack_require__("./src/base/components/Payment/Loader lazy recursive")(vue__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.$VUE_LOADER_CONFIG.componentUrl);
}
Reason: Error: Cannot find module '../../Loaders/SomeLoader'
Any ideas?