I’m trying to import a javascript file in my Spring Boot/Vaadin project. I have tried every possible way but nothing works. I have created the following directories:
root/frontend/src/script.js
root/src/main/frontend/src/script.js
root/src/main/resources/META-INF/resources/src/script.js
root/src/main/resources/static/src/script.js
I’m including it this way @JavaScript(“./src/script.js”) in the view and executing it this way getElement().executeJs(“jsmethod()”);
What am I missing here?