N00ts / vue3-treeview

a simple treeview in vue js 3
MIT License
71 stars 61 forks source link

`dist/vue3-treeview.esm.js` is not available in the dist folder #3

Closed Utwo closed 2 years ago

Utwo commented 2 years ago

Tried this library in a vue3 project with vite and I got the following error.

error: [plugin: vite:dep-scan] Failed to resolve entry for package "vue3-treeview". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "vue3-treeview". The package may have incorrect main/module/exports specified in its package.json.

Upon further investigation, it seems that vue3-treeview.esm.js is missing from the dist folder.

N00ts commented 2 years ago

Hey, do you have specific reproduction scenario ?

Utwo commented 2 years ago

Sure, made a little example here https://codesandbox.io/s/hello-vite-forked-olm9r?file=/src/App.vue

N00ts commented 2 years ago

I changed vue-cli build lib (that does not create esm file) by "vite" (with rollup under the hood). And published a 0.3.4 version. Can you try again ? I didn't found a way to rename vue extracted style with vite so if you want to use it you can import "vue3-treeview/dist/style.css";

Utwo commented 2 years ago

Yes, is working! Thank you very much! After a couple of hours of searching for a decent tree view library in vue3, I finally found yours. Simple and stable, is exactly what I wanted!

N00ts commented 2 years ago

Thank you ! I updated the documentation to put some codesandbox instead of direct components because vitepress is still not completely finished. Don't hesitate to suggest improvements and put a star if you like it :)