vaadin-grid-flow request files from root path

I’m using vaadin-grid-flow in my flow project. When navigating to a view with the Grid component I get an error in the web browser console that it can’t find the file at
http://localhost:8080/gridConnector.js

The file exist in the jar package vaadin-frid-flow-1.0.0.alpha1.jar in folder /META-INF/resources/frontend. If I navigate to
http://localhost:8080/frontend/gridConnector.js
then the file is found.

I have set the flag -Dvaadin.frontend.url.dev=context:// when running spring-boot:run. Should that be changed or is there anything else that I have to change?

Hello.

Yes, this happens due to the -Dvaadin.frontend.url.dev=context:// setting, we’re working to make it more convenient in future.
Is there any reason for you to set it this way? If there is no, you can just go with the default one, which is context://frontend and everything will work.

I’m using the Bakery Flow Starter where that setting is set. If a remove it I get an error that another file could not be found:

http://localhost:8080/frontend/bower_components/webcomponentsjs/webcomponents-loader.js

Is it because of the mix of bower and webjars?

Is it because of the mix of bower and webjars?

Yes, this is exactly the case. I will have a look at bakery and see how to fix the issues there, the global ticket is created also: https://github.com/vaadin/flow/issues/3096

I’ll come back when there is a workaround.

Just to keep you informed: the -Dvaadin.frontend.url.dev=context:// setting will be removed in future, since it appears to be asier than invent lots of stubs to support different paths inside jars.
It will take some time, since Bakery is developed by other team and they have some interesting stuff going on inside.

Meanwhile you can check out other starters, if interested:
https://github.com/vaadin/skeleton-starter-flow – simple started with just a button, using webjars and frontend-maven-plugin
https://github.com/vaadin/beverage-starter-flow – a bit more complex example with a grid, using webjars and frontend-maven-plugin
https://github.com/vaadin/skeleton-starter-flow-spring – simple example of Spring usage, using bower and frontend-maven-plugin

And the PR to fix Bakery is created either: https://github.com/vaadin/bakery-app-starter-flow-spring/pull/318

Thank you for your help!