schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs, SSR and SSG.
https://jasprpad.schultek.de
MIT License
1.07k stars 65 forks source link

fix: auto refresh browser on changes #100

Closed Shreemanarjun closed 1 year ago

Shreemanarjun commented 1 year ago

Description

Unable to hot reload my app in browser automatically but in terminal its showing Server application reloaded.. But manually refresh working correctly using browser refresh button.

Steps To Reproduce Device: Mac Browser: Chrome

  1. Create a simple jaspr app
  2. run in chrome in debug mode (reload/refresh mode)
  3. change some text in app.dart file
  4. No changes in browser because of no auto refresh

Expected Behavior

The browser should automatic refresh the page whenever any code changes made as like other frameworks.

Additional Context

name: my_web_app description: A classic web app using separate html, css and dart files with ssr & manual client hydration. version: 0.0.1

environment: sdk: '>=3.0.0 <4.0.0'

dependencies: jaspr: ^0.6.0

dev_dependencies: build_runner: ^2.4.0 jaspr_web_compilers: ^4.0.4 jaspr_builder: ^0.6.2 lints: ^2.1.0

schultek commented 1 year ago

Thx for the issue. What command do you use for running the app (jaspr serve ...) ?

Shreemanarjun commented 1 year ago

jasper serve only. and if i disable Use jaspr web compilers (experimental)? This enables the use of flutter web plugins and direct flutter embedding. (Y/n) then hot reload works correctly. Please refer to repo [demo](https://github.com/Shreemanarjun/my_jaspr_app)

schultek commented 1 year ago

Should now be fixed with jaspr_web_compilers: ^4.0.5+1