flow icon indicating copy to clipboard operation
flow copied to clipboard

Flow.tsx should be shipped as Flow.js

Open Artur- opened this issue 6 months ago • 3 comments

Description of the bug

You generally should never ship TS as the user might have different TS settings and the TS might not compile. There is also no point in shipping the TS file compared to shipping .js (and .d.ts if needed)

Expected behavior

All included resources are JS so that compilation of a user project cannot fail because of a typing problem in a file they cannot edit

Minimal reproducible example

See #18580

Versions

  • Vaadin / Flow version:
  • Java version:
  • OS version:
  • Browser version (if applicable):
  • Application Server (if applicable):
  • IDE (if applicable):

Artur- avatar Feb 01 '24 12:02 Artur-

@Artur- is this a blocker for 24.4 ? I think in 24.3 we were shipping already files as .ts Probably it's something we can fix in a patch release.

manolo avatar May 17 '24 06:05 manolo

As nobody has commented with any more issues, it does not seem to be blocking much

Artur- avatar May 17 '24 09:05 Artur-

Looks like too much effort right now. There's no TS compilation done in flow-server currently so we'd need tsconfig, package.json etc. to satisfy dependencies. Additionally Flow.tsx has a dynamic import for routes and the path is not known until (application) project build time - I was not able to figure out how to circumvent this.

One possibility could be if maybe we can move Flow.tsx to flow-client which would have all the infrastructure in place.

tepi avatar May 24 '24 13:05 tepi