Closed chrisruffalo closed 1 year ago
Stupid question, why do you separate frontend and backend?
@aloubyansky shouldn't we handle this at Quarkus core level (have a look at the PR code)
How could we reproduce the issue @chrisruffalo?
Oh, sorry, frontend
and backend
were just for illustrative purposes. They're really microservices that share the same SSO but handle different aspects of the application. (One is the frontend/backend, one is API-only for scaling purposes. My personal project is all silly so it doesn't necessarily make sense anyway.)
Speaking for the other project there are four microservices and only one has a UI, even if I only enable the web bundler in one submodule it doesn't work.
@aloubyansky to reproduce it I can just make a multi-module project I can share. I need to work on that. And @ia3andy I figured this would require a Quarkus-level solution but I had hoped I was just missing some injection.
@chrisruffalo a reproducer would help
Minimal-est reproducer, it doesn't even take more than one module to make it break: https://github.com/chrisruffalo/web-bundler-reproducer. Thanks!
Thanks @chrisruffalo A quick workaround for you would be to enable quarkus.bootstrap.workspace-discovery
, which is disabled for the build
goal.
It looks like the logic that involves static resource cleaning is meant to be executed only in dev and test modes, in those modes workspace discovery is enabled by default and the build directory will be available. Based on that, here is an alternative https://github.com/quarkiverse/quarkus-web-bundler/pull/49
@aloubyansky that tracks, I forgot to mention everything works fine in dev mode. Thanks!
I'll release soon!
@all-contributors please add @chrisruffalo for code
@ia3andy
I've put up a pull request to add @chrisruffalo! :tada:
This is a fix I had to use for getting around an issue with the way that the buildDir was being calculated/found in multi-module projects.
My project is structured like this:
When building the
frontend
module (either from the parent or from within the frontend directory) I get the following error:This lead me to make the change in this PR and then set up the quarkus-maven-plugin:
This fixes the problem but clearly isn't the way it should be done.