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

Lighter bundles with no-side-effect #5560

Open
dubzzz opened this issue Dec 26, 2024 · 2 comments
Open

Lighter bundles with no-side-effect #5560

dubzzz opened this issue Dec 26, 2024 · 2 comments

Comments

@dubzzz
Copy link
Owner

dubzzz commented Dec 26, 2024

Not a game changer but always better to target a lighter bundle. We could try to look at fabian-hiller/valibot#995

@TomerAberbach
Copy link
Contributor

Not sure if you're using rollup or not, but I wrote a rollup plugin that automatically "pure" annotates all top-level constructs that could be interpreted by bundlers as effectful

I've been using it with some of my libraries to make them fully tree shakeable. You can see these annotations in the bundled source of lfi, which supports tree-shakeability well as a result.

@dubzzz
Copy link
Owner Author

dubzzz commented Dec 26, 2024

So far, I'm not using any real bundler to bundle fast-check. But I might one day.

The whole target of this issue is to analyze whether or not I can make users' life better if they pull fast-check in their bundles. That said I don't know why they would do that.

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

No branches or pull requests

2 participants