Paths to static resources using @JavaScript and @StyleSheet

I hope this isn’t out of date, and I know others have posted on this subject already.

I think the way paths are treated in the values of the @JavaScript and @StyleSheet annotations is a serious shortcoming.

As I understand it the way it works at present you can either
a). use the absolute path in the annotation (including the domain). In which case the file is loaded from there. Fine if you’re using a publicly available js API maybe, though you probably want to have your own copy to remove the dependency. Or
b). use a relative path (with or without an initial path separator). In which case VAADIN will attempt to load the resource from “APP/PUBLISHED/”. You want to use a relative path if these are your resources and are part of the app, but having them all available on the classpath rather than the canonical webapp paths is not at all what you want.

If the resources themselves contain references to other resources then you end up having to have the resources available BOTH on the classpath AND the canonical web app.

Why not enable the mechanism to load files from the canonical web app path as you would in any other web app? Perhaps by using an initial path separator on the path passed to the annotations…

Am I missing something that allows you to do this already or solves the issue in another convenient way?

Many thanks