smastrom / vue-collapsed

🏋️‍♂️ CSS height transition from any to auto and vice versa for Vue and Nuxt. Accordion ready.
https://vue-collapsed.pages.dev
MIT License
123 stars 8 forks source link

Named export 'Collapse' not found. #6

Closed mrleblanc101 closed 1 year ago

mrleblanc101 commented 1 year ago

Named export 'Collapse' not found. The requested module 'file:///Users/sleblanc/Github/mrleblanc101.github.io/node_modules/vue-collapsed/dist/index.umd.js' is a CommonJS module, which may not support all module.exports as named exports.

mrleblanc101 commented 1 year ago

This is in a Nuxt 3 app using Vite.js 3

smastrom-dolly commented 1 year ago

Hi @mrleblanc101, I crated a basic usage example using Nuxt 3 with SSR.

https://stackblitz.com/edit/nuxt-starter-zfiqcm?file=app.vue

Please let me know if you still have issues.

mrleblanc101 commented 1 year ago

@smastrom Thanks for the quick reply. Sorry, I wasn't clear. I have it working with yarn dev (dev mode). But not with yarn generate (production mode for static site generation.

mrleblanc101 commented 1 year ago

Why do you do export { s as Collapse }; which require use to import like this import { Collapse } from 'vue-collapsed'; Instead of export default collapse which would allow us to do import Collapse from 'vue-collapse' ?

mrleblanc101 commented 1 year ago

Wait, I think it work with 1.1.1 that you just released 15min ago. Or maybe the Nuxt server needed a break 🤔 Thanks anyway !