Open BobrImperator opened 6 years ago
If this is going to be an issue I think we should stop relying on Sass for our addon styles and convert it to plain CSS. The styles are very minimal, we don't really need a preprocessor.
I added a quickly translated with searchnreplacing the {};
addon.sass and put it in the addon/styles
directory and the errors was gone. I configured my project to use sass
instead of scss
so that might be the reason why it tries to pick up the wrong one. It might have to do with https://github.com/aexmachina/ember-cli-sass/issues/163 as several addons are reporting issues regarding that error message.
I'm now working on a project that does not use Sass or ember-cli-sass, and it's extremely difficult to get this working since it only ships Sass. If this addon shipped plain CSS instead, it would be much easier to integrate with any project's CSS pipeline.
I'm going to create a branch with plain CSS so that our team can look at it and discuss the merits of changing the approach.
It would be convenient to have a hotfix regarding deletion of addon/styles
as this would fix failing builds for project that use .sass
as an extension. The underlying problem is from ember-cli-sass
anyways so the long term fix would indeed be to avoid using sass at all (although its not a problem to use it as long as there is no addon.(scss|sass)
file)
This is apparently still an issue. I'm testing out this library to see if it's something for our project. We recently moved away from compass and are using ember-cli-sass in combination with sass (not node-sass as that gives a whole other list of problems installing). My solution is to add this in the package.json within the script tag:
"scripts": {
"postinstall": "rm -rf node_modules/ember-table/addon/styles"
},
After that it stopped complaining / crashing.
I also added this to styles/app.scss
@import 'ember-table/default'
The problem
When attempting to use ember-table in a project, that uses
sass
files for styles, then the build fails. This happens by default here, becauseember-table
has styles in bothaddon
andapp
directories.Fix
As documented in https://github.com/aexmachina/ember-cli-sass#alternative-addon-usage The Table does exactly that, but as mentioned there are styles inside
addon
directory as well, and they mustn't be there, because that's The Problem.addon/styles