ember-cli-sass icon indicating copy to clipboard operation
ember-cli-sass copied to clipboard

Does not work with Embroider

Open EWhite613 opened this issue 2 years ago • 5 comments

As soon as add Embroider to app get the following error:

Sass Syntax Error (SassCompiler) in /var/folders/pp/c2t4mbcx5h7bcds74ycn_pn40000gq/T/broccoli-69612Xlii22B2hH23/out-0008-funnel/addon.scss:3:1

Error: File to import not found or unreadable: ../pods/components/context-panel/styles.
        on line 3 of ../../../../var/folders/pp/c2t4mbcx5h7bcds74ycn_pn40000gq/T/broccoli-69612Xlii22B2hH23/out-0008-funnel/addon.scss
>> @import '../pods/components/context-panel/styles';

Note this error comes from an Addon the App consumes, which uses ember-cli.

EWhite613 avatar Jun 27 '23 22:06 EWhite613

I believe I can use the webpack sass-loader in my App. But atm not sure there's a way forward with consuming an addon that uses ember-cli-sass. Some discussion on Ember discord others may find useful

EWhite613 avatar Jun 27 '23 22:06 EWhite613

What's the situation re embrdoier? When I ask Glime, it suggests not using this addon and instead using a Webpack plugin, is that right?

amk221 avatar Jan 19 '24 14:01 amk221

@amk221 Currently I don't have it working in my setup (but I perhaps am doing some more abnormal things like importing from node_modules). I plan to try experimenting with moving to postcss and using https://github.com/csstools/postcss-sass. I have it locally, just need to see if my setup converted to that will still not work with Embroider or what.

@bendemboski does however use ember-cli-sass in Embroider (discord about this). So it may be some use case I have that does not work

EWhite613 avatar Jan 19 '24 15:01 EWhite613

@amk221 If starting ecosystem from scratch I don't think most people advise using ember-cli-sass anymore (I wouldn't for sure)

EWhite613 avatar Jan 19 '24 15:01 EWhite613

Thanks @EWhite613, not starting from scratch, updating a 10 year old project that already uses ember-cli-sass :)

amk221 avatar Jan 19 '24 15:01 amk221

Just to clarify, we're using this addon in most of our Embroidered projects and it works just fine. So ember-cli-sass shouldn't be a blocker for the Embroider migration.

The error message in the original description mentions pods though so I'm guessing something funky is going on in that specific setup.

Windvis avatar Jan 28 '25 16:01 Windvis

so I've also seen this working with an Ember app that's using Vite so I think we can safely close this issue 🤔 It's something that you should probably move off once you get to Vite (and use their native sass implementation) but it's not a blocker

mansona avatar Jan 28 '25 17:01 mansona

Also the stability of Embroider has improved greatly since this issue was originally reported. We can re-open if someone is still having problems 👍

mansona avatar Jan 28 '25 17:01 mansona