Browser doesn't reload after the local development server detected changes to the local code when developing an Angular Frontend
See original GitHub issueGiven a freshly created AEM 6.5.0 project, created with an Angular Frontend using Archetype Version 23 and default parameters…
Expected Behaviour
When executing npm run start
from the ui.frontend
module, the development server should reload on local changes (which is also stated in the generated README.md).
Actual Behaviour
The development server detects local changes, but the browser doesn’t reload and display them. Locally Webpacked Javascript Files are not included in the HTML while a couple of files from etc.clientlibs
are.
In http://localhost:4200, after the redirect to /content/myapp/at/de/home.html, there is an include of <script type="text/javascript" src="/etc.clientlibs/myapp/clientlibs/clientlib-angular.js"></script>
instead of the Webpack-Includes:
<script src="runtime.js" type="module"></script>
<script src="polyfills.js" type="module"></script>
<script src="styles.js" type="module"></script>
<script src="vendor.js" type="module"></script>
<script src="main.js" type="module"></script>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Angular/CLI -- auto reload doesn't happen - Stack Overflow
The site is getting updated only when I terminate the "ng serve" command and again run the same command("ng serve") then only my...
Read more >Why webpack-dev-server Live-Reload Is Not Working - Medium
This means that any code change, appears automagically and instantly on the browser. Here is what webpack-dev server actually does:.
Read more >Browser support - Angular
Angular is built on the latest standards of the web platform. Targeting such a wide range of browsers is challenging because they do...
Read more >Using Angular's Live Reload Web Server to Refresh Pages on ...
The problem is that by default the WebPack server is bound to localhost. localhost is the local loopback adapter or 127.0.0.0 which does...
Read more >Automatically refresh the browser on Node / Express server ...
In the app.js file, three main changes must be done. ... var livereload = require("livereload"); var connectLiveReload = require("connect- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mzellho Those are the only changes as far as I remember. As you pointed out in your first comment, the front-end app is pointing to AEM for all script. So, if my solution didn’t work, probably you would want to remove all references to your AEM (completely disabling proxy in your front-end is one option).
I dont know why
"/content/**/*"
is proxied. I ended up doing following changes to make it work:"context": ["/content/**/*.json", "/etc.clientlibs/**/*", "/libs/**/*"],
<base href="/">