-
Notifications
You must be signed in to change notification settings - Fork 769
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
"require is not defined" error when using with Vite #1361
Comments
+1 |
2 similar comments
+1 |
+1 |
@adlion @ap0xF @rayshoo Thanks for the interests! I think this comment explained why Could you take a look at the solution and see if it works for you? We will also look into improving this workflow to make it easier for Vite users as we go through the Typescript-ification of our codebase. Thanks! 😃 |
@sampajano Thank you for your comment. I had already confirmed this through many searches, but unfortunately, it didn't work for me as I created and used the proto stub file with javascript rather than typescript.(vite is also used as javscript) However, I did a simple build test in the repository you shared. It definitely works well. I need to study TypeScript, which I've been putting off. Thank you!! |
@rayshoo Ahh i see! Glad to hear that the demo app works at least! Typescript seems like the right bet indeed.. We are interested in improving our TS support going forward as well! |
I'm trying to add grpc-web client into a Sveltekit-based application. Here's the page load function (in Typescript, if that matters)
And the output is
where
service_pb.js
is the generated js file.The text was updated successfully, but these errors were encountered: