SASS with Ember CLI addons

2019-02-24 06:23发布

问题:

I'd like to know how I can use SASS within an Ember-CLI addon?

I have my styles in /app/styles folder, but I'm not sure that's the right location to have them. I have broccoli-sass installed in my addon project, my Dummy test website compiles properly the scss files when I include my folder in /tests/dummy/app/styles/app.scss.

@import 'app/styles/app.scss';

But I don't know how I can compile the scss files to go into the /dist/assets/vendors.css, which is the file loaded by projects using this addon.

回答1:

OK I just found out the solution

The style folder needs to be in /addon/styles instead of /app/styles, and the root file should be called addon.scss