Vaadin 23->24 + line-awesome

Hello,
I’m trying to move to version 24. Can’t solve the last problem, all the time keep getting an error:

java.lang.IllegalStateException: Asset ‘/line-awesome/dist/line-awesome/css/line-awesome.min.css’ is not found in project frontend directory, default development bundle or in the application bundle ‘src/main/dev-bundle/assets/’.
Verify that the asset is available in ‘frontend/themes/fun-management/’ directory and is added into the ‘assets’ block of the ‘theme.json’ file.
Else verify that the dependency ‘com.vaadin:vaadin-dev-bundle’ is added to your project.

line-awesome.min.css is present in generated folder, com.vaadin:vaadin-dev-bundle is present in external libraries.

In additional, I compared generated blank projects(23 vs 24). There are a difference here
(v23):

nav.addItem(new AppNavItem(“Hello World”, HelloWorldView.class, “la la-globe”));
(v24):
nav.addItem(new AppNavItem(“Hello World”, HelloWorldView.class, LineAwesomeIcon.GLOBE_SOLID.create()));

also in v24 new dependency is added:

        <groupId>org.parttio</groupId>
        <artifactId>line-awesome</artifactId>
        <version>1.1.0</version>

The old way no longer works and needs to be rewritten? Or is there a way to make it work?

You can try to add the resources in the asset block of theme.json, as suggested in the error message.
Something like the snippet below

 {
   "lumoImports": ["typography", "color", "spacing", "badge", "utility"],
   "assets": {
     "line-awesome": {
       "dist/line-awesome/css/**": "line-awesome/dist/line-awesome/css",
       "dist/line-awesome/fonts/**": "line-awesome/dist/line-awesome/fonts"
     }
   }
 }

This helps. Thank you!
But why there is a difference ? What was changed ?

Also I’ve got new error/warning:

(!) Some chunks are larger than 500 kBs after minification. Consider:

The addon doesn’t import additional resources, it’s only using svg. So with the addon, you can use the default bundle instead of rebuild a new one.
That’s the reason of the change. The API is also more convenient for a Java user.

The warning is “normal” the default bundle (vaadin components) is larger than 500kb. I’m checking if there is a ticket about it.

It’s normal and no ticket about it :slightly_smiling_face:

One ticket will appear magically soon :slightly_smiling_face: