Jacobs63 / vue3-tabs-component

Vue 3 tabs component
MIT License
96 stars 27 forks source link

Fix: Small change to make it work for Vite #1

Closed louisiukas closed 3 years ago

louisiukas commented 3 years ago

There is an issue where it will not import the components for my vue 3 setup using Vite with a standard config file:

 > node_modules/vue3-tabs-component/src/index.js:1:16: error: Could not resolve "./components/Tab"
    1 │ import Tab from './components/Tab';
      ╵                 ~~~~~~~~~~~~~~~~~~

 > node_modules/vue3-tabs-component/src/index.js:2:17: error: Could not resolve "./components/Tabs"
    2 │ import Tabs from './components/Tabs';

I had to add .vue extensions to the components in the index.js file in order to fix it:

src/index.js:

import Tab from './components/Tab.vue';
import Tabs from './components/Tabs.vue';
Jacobs63 commented 3 years ago

Hello,

I've tested it and can confirm that was the issue.

Version 1.0.1 has been released which fixed this issue.

Thank you for your contribution.