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

adding remix hook form breaks build #119

Closed
Fawwaz-2009 opened this issue Nov 4, 2024 · 1 comment
Closed

adding remix hook form breaks build #119

Fawwaz-2009 opened this issue Nov 4, 2024 · 1 comment

Comments

@Fawwaz-2009
Copy link

hey Alem 👋 , I made this re-production for the issue. so first right now, it's seems that even adding a slim regular form would cause a crypto dependency issue go to branch with-regular-form

image

you can see the error if you run npm run dev and refresh the page. nonetheless it does built successfully
image

However if you are on the main branch and try to do npm run build, it would just fail
image

@AlemTuzlak
Copy link
Contributor

after going through this there is nothing that indicates this is an issue with remix-hook-form, the crypto package is not used, nor is anything from node, this must be caused by something else, my best guess would be that here:
https://github.com/Fawwaz-2009/remix-crypto-issue/blob/main/app/actions/with-remix-hook-form.tsx#L15
you leak server only function (json) to the client bundle and that causes the crypto issue, try splitting the files up and using .server for the json utility

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