SAP / ui5-tooling

An open and modular toolchain to develop state of the art applications based on the UI5 framework
https://sap.github.io/ui5-tooling
Apache License 2.0
465 stars 69 forks source link

Live reload #99

Closed alexanderchan closed 4 years ago

alexanderchan commented 5 years ago

Expected Behavior

Server is a live reload and bonus points for supporting hot module replacement. Perhaps I missed it.

Current Behavior

Server is static

Steps to reproduce the issue

  1. ui5 serve
  2. change a file (html, js, xml etc)
  3. wait
  4. nothing happens
  5. refresh your browser yourself like it's 2013 :laughing:

Context

Affected components (if known)

I know it's not as easy to make the cli like create-react-app or vue but they're really the gold standard and we should strive for that

mahendra3006 commented 5 years ago

When can we expect this functionality.We badly need this,as we need to login into our app again after each refresh.

matz3 commented 5 years ago

Regarding live reload, you might have a look into our BrowserSync example, to see how you can use it with our tooling already: https://github.com/SAP/ui5-tooling/tree/master/examples/browsersync

mahendra3006 commented 5 years ago

Thank you for the quick response.It reloads the change when there is an update,but I was looking for hot module replacement so that I do not need to reload the page after each change in UI. In my project login takes about 2 minutes and then to navigate to the screen also takes good amount of time.

matz3 commented 5 years ago

Unfortunately, I did not have a deeper look into how hot module replacement is done in frameworks like react or vue. But I would expect that this can not be easily integrated into UI5, as the framework hasn't been designed for it. This needs to be investigated to see whether it would be possible at all. So some input on this would be much appreciated đź‘Ť

matz3 commented 5 years ago

In my project login takes about 2 minutes and then to navigate to the screen also takes good amount of time

Isn't that something that could be addressed on your side? The session should not be invalidated, just by refreshing the page. And when using a router with hash based URL navigation, the refresh should bring you to the same page as before the refresh.

mahendra3006 commented 5 years ago

We have a custom router without hash routing. Also, we have multiple apps inside a main app which has the login functionality. Running any one app in isolation is also not possible.

fatschi commented 4 years ago

https://github.com/petermuessig/ui5-ecosystem-showcase/tree/master/packages/ui5-middleware-livereload might be helpful!?

alexanderchan commented 4 years ago

Don’t need this anymore as am not using ui5