0👍
With require()
you can import NPM packages by their name, like require('express')
;
If you want to import a local file, you have to use a relative path, which for “current path” is ./
So your code should be:
Vue.component('main-chart-of-accounts', require('./chart_of_account.vue').default);
That way your bundler understands that you want a file, and not a package named “chart_of_account.vue”
- [Vuejs]-Vue inline template not triggering method even with emit
- [Vuejs]-Nativescript-vue. Using SVG Graphics, Images, Icons
Source:stackexchange.com