Skip to content

Jooby webpack assets not included in Jar #1328

Description

@AZWN

Hi,

When using jooby-frontend with webpack, I noticed the webpack bundle (public/dist directory) is not packaged in the generated jar file. Therefore, production applications can not serve client resources.

I created a small reproduction.

When using mvn jooby:run, the files are served properly, but when doing mvn package and java -jar target/joobywebpack-1.0.0.jar application.env=prod, a 404 error is returned.

Is there any guideance on how to include these assets when bundling the application?

PS: I tried to figure out how webpack-starter is doing it, but it gave me a 404 when doing mvn jooby:run, and a java.lang.NoClassDefFoundError: org/jooby/frontend/Npm after packaging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions