In Spring boot you normally put your resource files into META-INF/resources/frontend folder inside your resource root.
You have src folder inside frontend . Does it contain any files (and are they discovered by the build)?
Denis Anisimov:
You have src folder inside frontend . Does it contain any files (and are they discovered by the build)?
Yes the src folder inside frontend contains files, but they are also not discovered:
@JavaScript("./src/scripts/navigation.js")
Failed to resolve the following files either:
· in the `/frontend` sources folder
· or as a `META-INF/resources/frontend` resource in some JAR.
- ./src/scripts/navigation.js
Please, double check that those files exist.
Denis Anisimov:
In Spring boot you normally put your resource files into META-INF/resources/frontend folder inside your resource root.
How should the file structure look like, webapp > src > main > resources > META-INF > resources > frontend ?
Then the following error appears:
Failed to find the following imports in the `node_modules` tree:
- @vaadin/flow-frontend/src/scripts/navigation.js
If the build fails, check that npm packages are installed.
Failed to find the following imports in the `node_modules` tree:
- @vaadin/flow-frontend/src/scripts/navigation.js
If the build fails, check that npm packages are installed.
Oh, my bad. frontend folder inside the project root should work for Spring boot project as well.
So your initial config should work.
Looks like a bug. Could you pleases create a ticket ?