MartinMalinda / vue-concurrency

A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition API.
https://vue-concurrency.netlify.app/
MIT License
352 stars 15 forks source link

Fix Vite 5 Compatibility #96

Closed Hawxy closed 11 months ago

Hawxy commented 11 months ago

@MartinMalinda

For some reason using this package with Vite 5 results in a cryptic error to do with the way CAF is imported, not too dissimilar to the Webpack 5 issues. Given the ecosystem has mostly moved to Vite/WP5 by this point, I decided to go a bit scorched earth and replace the build + test infrastructure with the Vite equivalent, which is how most Vue libraries are being built these days. I've also updated the TS exports with the TS 5+ package.json spaghetti requirements so publint is happy. I've tested the new build in my application and confirmed it works fine.

In theory this should also close #58, but I'll need someone to test that.

MartinMalinda commented 11 months ago

Thanks @Hawxy ! This looks great.

Using vite as a build tool definitely improves maintainability. I think it wasn't available when I built this back then. I'll give this a run tomorrow 🙏

MartinMalinda commented 11 months ago

I'm testing it locally, all seems to work well 👍 There's only two formats being placed in the dist folder but I assume it's enough. Microbundle used to also create some .mjs and so on, but maybe it's not actually needed let's see.

MartinMalinda commented 11 months ago

Released in 5.0.0