hilla icon indicating copy to clipboard operation
hilla copied to clipboard

The multi-module generator does not support using a custom client

Open cromoteca opened this issue 3 years ago • 1 comments

The endpoints-custom-client test module fails when using the multi-module generator as it doesn't pick up the provided custom client.

It should mimic the existing feature as implemented at https://github.com/vaadin/hilla/blob/42ea5619a0d670b39ef330be68caaf0423c37ad0/packages/java/endpoint/src/main/java/dev/hilla/frontend/TaskGenerateEndpointImpl.java#L50-L54

cromoteca avatar Aug 05 '22 13:08 cromoteca

It should be OK for the initial implementation to assume that the frontend directory is one level above the generated one.

Check if frontend/connect-client.ts file exists:

  • If so, use it for imports in the generated TypeScript files
  • Otherwise, generate the frontend/generated/connect-client.default.ts client file and use it

platosha avatar Aug 09 '22 12:08 platosha