question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Load sub module frontend files from the file system instead of from the jar in dev mode

See original GitHub issue

Use case in https://github.com/vaadin/flow/issues/607#issuecomment-524527810.

The reason this doesn’t work is that any frontend resources from jars are extracted into the main project’s file system when the servlet context is deployed and then webpack picks up the files from there.

For this kind of setup to work, it would be necessary to somehow configure webpack to also look for frontend files directly from the file system for project A in addition to the /frontend directory of the main project and then probably also generate imports in generated-flow-imports.js accordingly.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Legiothcommented, Aug 30, 2019

it should be possible to have the application server pick up the changes from dependent modules when those are recompiled

That would require setting up the project structure in a way that first builds an updated jar file for the sub module and then redeploys the new project with an updated jar on the classpath. Doing all that would probably be too slow for a practical development flow. That’s why I suggested that it would instead somehow be possible to configure the dev server to pick those files directly from the file system instead of packaging and redeploying for each change.

1reaction
heruancommented, Aug 30, 2019

Worth noting there are also dependencies to be taken care of: in Bower mode we had WebJars to depend on, in NPM mode we have package.json files around the JARs to be taken into account to fetch correct dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git submodule - Atlassian
A git submodule is a record within a host git repository that points to a specific commit in another external repository. Learn more...
Read more >
Maven does not add dependency jar files to project when ...
I just tried that, but it doesn't pick up any other dependency except junit-4.4.jar , all the dependency jars are successfully loaded in...
Read more >
Overview | Deploying to Production | Flow | Vaadin 14 Docs
Deploying to a production server involves compiling and packaging the application to be suitable and optimized for the server.
Read more >
Overview | Deploying to Production | Hilla Docs
The main difference between development and production modes is that, ... webpack to serve JavaScript files to the browser, instead of the ...
Read more >
8 Understanding WebLogic Server Application Classloading
The extensions classloader loads any JAR files placed in the extensions ... Class caching is supported in development mode when starting the server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found