I one file I have a component registered like this (/tables/mytable.ts):
import Vue from "vue";
Vue.component('my-table', {
template: "<p>mycomponent</p>"
});
I second file I want to use my component (myvue.ts):
import Vue from "vue";
// these two ways bellow don't working too
//import myTable from 'my-table'
//import { MyComponent } from '/tables/mytable.ts';
let v = new Vue({
el: "#tabForUsers",
template: "<my-table></my-table>"
});
I get error:
Unknown custom element: <my-table> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
In webpack I have every ts file separately.
import './tables/mytable.ts'
? – Explosion Pills'./tables/mytables'
– Explosion Pills