Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load static resource(css, js, ..) in vaadin quarkus framework npm mode build. #16

Open
harshithpawar94 opened this issue Jun 22, 2020 · 3 comments

Comments

@harshithpawar94
Copy link

harshithpawar94 commented Jun 22, 2020

Hi, while implement vaadin(14.2) with quarkus(1.15.0.Final) framework, static resources(css, js, images, etc..) are not getting loaded in npm mode vaadin 14+.
I know that your project runs in compatibility mode, But I was really hoping you could help me out with my issue.

Here is the same sample GitHub reproducing project to demonstrate the above-said problem.

sample demo project to illustrate

@ahofmeister
Copy link

Hi @harshithpawar94,

I digged a while and found out the right spot to place your CSS files:

Annotate your class with eg @StyleSheet("style.css")

and your file needs to be at src/main/resources/META-INF/resources/frontend/style.css. I did not test it with JS. Will try it, if I need it. Please let me know, if it helps you.

PS: I just downloaded this repo and started the example - nothing else. :)

@harshithpawar94
Copy link
Author

HI @ahofmeister,

Thanks for the reply, Yes this works fine I have tried before. But I think we have an issue while running in quarkus dev mode in vaadin npm version(which has node_modules js dependencies). while running in production mode(java -jar *.jar) everything seems ok for npm mode. Do you have any idea for quarkus:dev mode?

@ahofmeister
Copy link

@harshithpawar94 Nope, I do not have any node modules yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants