Skip to content

@NpmPackage assets should not flatten folder structure when copying assets #22713

@sissbruecker

Description

@sissbruecker

Description of the bug

I'm trying to load Fontawesome with @StyleSheet like so:

@NpmPackage(value = "@fortawesome/fontawesome-free", version = "7.1.0", assets = {
        "**:fontawesome"
})
@StyleSheet("assets/fontawesome/css/all.css")
public class Application implements AppShellConfigurator {

This doesn't work, because the copied assets end up in a flattened file structure so that both the CSS entrypoint and the font file referenced in that CSS file end up in the wrong path:

[assets/fontawesome]
├ all.css
├ fa-regular-400.woff2

Expected behavior

I would expect the copy operation to preserve the existing file paths from that package:

[assets/fontawesome]
├ css
│   └── all.css
├ webfonts
│   └── fa-regular-400.woff2

Minimal reproducible example

See code snippet above

Versions

  • Vaadin / Flow version: 25

Metadata

Metadata

Assignees

Type

Projects

Status

🏗 WIP

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions