Speed up css development, inject css ?

Hi, working with css in frontend folder is quite slow, i have to rebuild and redeploy the app for each change, is there a way to speed up the development?

Fot instance inject the css as was possible in vaadin 8, is it possible also in vaadin 14?

Thanks

Hi,

Normally in Vaadin 14, if you run the application in dev mode your css file should be automatically refreshed.
I tried with the Plain Java Starter and it’s working. I don’t need to restart the server. (If you add @CssImport you need to restart).

Perhaps I don’t understand your question or you have a different setup. Do you have the same problem with your javascript files?

Hi Jean,

thanks for the reply,

yes, i’m using @CssImport(“./styles/mystyle.css”) may be that’s the problem.

Should i use the @StyleSheet annotation ?

What are the difference between them?

Thanks

I’m using @CssImport(“./styles/shared-styles.css”)

So this annotation is not the problem. I’m running the project with mvn jetty:run goal (it’s also working with spring-boot). Are you running the application in development mode?

Hi,

you are right, i was running in production mode, so i modified in debug mode.

Thanks a lot

Great!

I hope you will enjoy the dev mode :slight_smile:

Jean-Christophe Gueriaud:
Great!

I hope you will enjoy the dev mode :slight_smile:

Thanks