Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both auto refresh and manual refresh not working #9

Open
DesDiv opened this issue Jun 11, 2017 · 2 comments
Open

Both auto refresh and manual refresh not working #9

DesDiv opened this issue Jun 11, 2017 · 2 comments

Comments

@DesDiv
Copy link

DesDiv commented Jun 11, 2017

Running the project with sbt ~fastOptJS and going to http://localhost:12345/index.html works perfectly fine.

But refreshing the page doesn't work, since I'm immediately redirected to http://localhost:12345/scalajs-react-template/, which doesn't exist, so each refresh fails with the error message The requested resource could not be found.. I tried on both the latest Firefox and Chrome and the behavior is the same. Since refreshing doesn't work, my current workaround is manually opening http://localhost:12345/index.html after every code change.

I'm not sure whether this template supports hot reload (auto refresh upon code change) or not, but if it does then it's not working for me either. After every code change ~fastOptJS runs and successfully produces an updated js/scalajs-react-template-opt.js file. But nothing occurs on the browser end.

@DesDiv
Copy link
Author

DesDiv commented Jun 12, 2017

Changing line 47 of AppRouter.scala to val baseUrl = BaseUrl.fromWindowOrigin / "index.html" fixed the manual refresh problem for me.

Hot reload still doesn't work though.

@Angel-O
Copy link

Angel-O commented Jan 20, 2019

@DesDiv you need to add this line <script type="text/javascript" src="./workbench.js"></script> to the index.html file as documented on the workbench plugin page
HTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants