Created my component EmployeeTable.vue
Then I exported as
<script>
export default {
name: "employee-table"
};
</script>
But when I import it in App.vue
as follows import EmployeeTable from "@/components/EmployeeTable.vue";
I get this error
error The "EmployeeTable" component has been registered but not used vue/no-unused-components
It's your es-lint setup. You can change it to not that strict rules or you can fix this actual problem.
1. Make sure that in App.vue
you registered it in a components section like this:
...
components: {
EmployeeTable
},
...
2. Make sure you used it in App.vue
template:
<EmployeeTable />
is there a way to omit this error if it is not directly in your template? I am trying to create the components dynamically so I only want them inserted into my dom when necessary and not at all times
To change to NON-STRICT, see answer below by another user.
@DanielvanDommele my answer might help you. stackoverflow.com/a/65046057/67022