0

I have the following structure:

app/
  pods/
    components/
      user-login/
        component.js
        style.scss
        template.hbs

Template files and component files livereload correctly, however, when I save changes to my style files in Atom the changes are not applied on the webpage- they are only applied when I kill and rerun:

ember server

and reload the webpage. I have installed the following:

ember-cli-styles-reloader

and I have tried adding:

"liveReload": true,
"watcher": "polling"

to:

.ember-cli

and I also tried adding these options to:

ember-cli-build.js

inside the app variable.

What am I missing?

1 Answers1

1

There is a better option I believe, and I recommend to do this way:

First install ember-cli-sass-pods addon that uses ember-cli-sass (will install automatically) and then generate your style scss files into your pods directories.

to install

ember install ember-cli-sass-pods

then add

  var app = new EmberApp(defaults, {

    // you must add Watched folder to your Ember-Cli-Build.js
    sassOptions: {
      includePaths: ['app']
    }

  });

For example:

app/components/user-login
app/components/user-login/component.js
app/components/user-login/template.hbs
app/components/user-login/style.scss

just simply run this command:

ember g style [path] -p //your path now is components/user-login

there are more options that you can read their documents

You are ,after installing and setting up that, able to use ember-cli-styles-reloader which probably will work smoothly. make sure you have followed all the rules that they mentioned in their documents to set up ember-cli-styles-reloader.

Majid
  • 2,507
  • 2
  • 19
  • 18
  • Thanks for the response, installing ember-cli-sass-pods package and adding the sassOptions variable to the Ember-Cli-Build.js got it so that reloading the page would update the style. I had to remove ember-cli-styles-reloader from the package.json file and do an npm prune to get it so that it reloaded automatically when I saved the file. Thanks again. – KroneckerDeIta Nov 19 '16 at 15:46