Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Vite 5 Compatibility #96

Merged
merged 5 commits into from
Dec 23, 2023
Merged

Fix Vite 5 Compatibility #96

merged 5 commits into from
Dec 23, 2023

Conversation

Hawxy
Copy link
Contributor

@Hawxy Hawxy commented Dec 16, 2023

@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
Copy link
Owner

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
Copy link
Owner

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 MartinMalinda merged commit 0bf7da2 into MartinMalinda:master Dec 23, 2023
@MartinMalinda
Copy link
Owner

Released in 5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webpack 5 fails due to the way CAF is imported
2 participants