0

I'm developing an ember-cli addon and I'd like to know if it's possible to set up live reload to trigger whenever I make a change in my addon. As of now, I have to restart my server every time I make a change to my addon.

JDillon522
  • 19,046
  • 15
  • 47
  • 81

1 Answers1

3

Officially, the way to do this is to edit your index.js and add the following:

isDevelopingAddon: function() {
    return true;
},

This is documented here: http://www.ember-cli.com/extending/#link-to-addon-while-developing

This only works if you have used npm link to link your addon to your application.

Update: This may have been broken since ember-cli 0.2.7 https://github.com/ember-cli/ember-cli/issues/4289

Gaurav
  • 12,662
  • 2
  • 36
  • 34
  • So I've done all of that and I can use my addon in my app, but changing my addon still doesnt trigger the live reload. – JDillon522 Jul 13 '15 at 21:06
  • Good find. I'll mark it as answered since you linked to a known issue thats more than likely a problem with watchman. – JDillon522 Jul 14 '15 at 14:01
  • just to clarify the `index.js` file you want is the one at the TOP level of your addon project (same level as the package.json), not the one inside the `addon` directory – Josh KG Apr 21 '18 at 17:52