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.

Auto-reload of Template

See original GitHub issue

This is a development-time convenience feature. When the server is run with productionMode = false, the framework listens for changes to used template files. When a change is discovered, the template is reparsed and the updated template tree is pushed to the browser for all active sessions, where it is immediately used to re-reender that part of the DOM.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
heruancommented, Aug 24, 2019

I’m bumping this now since with ES modules in V14 the DX related to this pretty much collapsed.

In Bower mode, JRebel was able to push changed templates immediately and automatically; e.g.

  • Project A (JAR): contains META-INF/resources/frontend/my-template.html
  • Project B (WAR): depends on project A

Then running Project B with JRebel, a change in Project A’s my-template.html was immediately available in the browser.

With ES modules, this no longer applies (at least I’m not able to make it work); e.g.

  • Project A (JAR): contains META-INF/resources/frontend/my-template.js
  • Project B (WAR): depends on project A

Then running Project B with JRebel, a change in Project A’s my-template.js isn’t available in the browser and I need to restart the application… if I’m lucky, as 50% of the times I also need to rm -rf node_modules target in Project B root to avoid client errors such as:

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "dom-module" has already been used with this registry

I understand this is pretty old, but I hope it will be addressed ASAP now that V14 is released and since Vaadin’s suggesting to migrate to ES module I expect many are already facing this.

0reactions
joherikscommented, Aug 26, 2020

Closing this ticket, as live reloading will now (in V17) trigger when any frontend resource is modified (and the main ticket covering monitoring submodule resources is #6347).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reload Flask app when template file changes - Stack Overflow
How to autoreload Jinja2 templates using nginx, uswgi and flask? ... Is it possible to view live changes in html/css from page served...
Read more >
Auto reload (twig) templates? · Issue #1029 · perwendel/spark
Hello, I'm using Twig for templating. Is it possible to auto-reload template changes? I see there's an option for static files, ...
Read more >
Template App Auto-Reload | Apple Developer Forums
I am going toward a solution that uses the storage api to put a key to identify the whole server side code version...
Read more >
32744 (Template changes cause dev server to reload)
Django 3.2 has changed the autoreload behavior of the dev server, and it now reloads on template file changes. Reverting to 3.1 fixes...
Read more >
Flask, html in /templates/ not reloading? : Forums
i have a python code, that create or re-write the content of an html page. This page is saved in folder /template/ inside...
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