ember cli and livereload: how to get it to work?

2019-04-27 02:54发布

I can't for the life of me get livereload to work with my ember cli project. This is the first time I try livereload, so I don't know if this problem is specific to ember cli, or if my Mac environment is not set up for it.

Here is what I have installed

$ ember --version:
  version: 0.0.46
  node: 0.10.32
  npm: 1.4.27

Here is how I got everything running:

$ ember new foo-bar
$ cd foo-bar
$ ember server
version: 0.0.46
Livereload server on port 35729
Serving on http://0.0.0.0:4200

Navigating to http://localhost:4200 in Chrome shows me the ember app.

Now if I make changes to 'application.hbs' and then save it, the browser doesn't update. Is there anything special I need to do to enable livereload?

I realize that this question is similar to live-reload not working with ember-cli, but the answer to that question doesn't solve my problem.

1条回答
太酷不给撩
2楼-- · 2019-04-27 03:25

This is a known issue with 0.0.46 at the moment. You can manually add this script tag to app/index.html to work around it.

<script src="http://localhost:35729/livereload.js?snipver=1" type="text/javascript"></script>
查看更多
登录 后发表回答