webark / ember-component-css

An Ember CLI addon which allows you to specify styles for individual components
MIT License
542 stars 115 forks source link

Incompatible with embroider #355

Open timiyay opened 3 years ago

timiyay commented 3 years ago

We're starting to test our Ember projects against the embroider build system at https://github.com/embroider-build/embroider, and we're currently unable to build.

Are there a known set of remedies this project needs, to support embroider builds?

The specific issue we're hitting relates to ember-component-css's pod-styles file.

Build Error (OneShot)

/var/folders/kj/m25gsmy53134qzh_6w2jmjq40000gn/T/broccoli-136603YXK5PprOZui/out-07-funnel/addon.scss:1:2: Error: File to import not found or unreadable: pod-styles.
        on line 1 of ../../../../var/folders/kj/m25gsmy53134qzh_6w2jmjq40000gn/T/broccoli-136603YXK5PprOZui/out-07-funnel/addon.scss
>> @import "pod-styles";

   ^

        at SassCompiler

The particulars of our current setup are:

This issue intends to start an Embroider-specific conversation around this particular build issue, as I may have time to contribute some fixes to get this project working.

BryanCrotaz commented 3 years ago

I'm seeing this in Octane with Ember 3.22 - did you get this working without embroider?

timiyay commented 3 years ago

At present, our setup is working OK on a mix of Ember 3.12 and 3.16 (which has Octane stuff).

I'll update this issue if I hit the same problem without Embroider.

JoseLawrence commented 3 years ago

@BryanCrotaz @timiyay - We are using Ember 3.24.0 with Octane and it works okay. But encountered this issue when trying to build with Embroider.

BTW, we are using LESS

webark commented 3 years ago

sorry. I haven't been working on ember for a while, and this project has gone a little derelict. There are some fundamental assumptions with the design that do not work with octane, nor embroider. There is a rewrite of this under https://github.com/webark/ember-cli-styles that was going to funnel into this (this is the rewrite of #333 broken up into sub packages) This is about 85% done. there are some differences outlined in #333 . If someone wanted to hack out a temp solution using the current architecture, i'll merge it through.

boris-petrov commented 3 years ago

@webark - does that mean that we should migrate from ember-component-css to ember-cli-styles? Is it production ready? What are the changes compared to ember-component-css? Thanks for working on that!

webark commented 3 years ago

@boris-petrov not production ready yet probably. it's been almost a year since i have worked on it. I haven't ran it through embroider yet, but the principal of how it works is sound in theory. The big difference is that you are importing directly the namespace during build time, rather then having it be interpreted at runtime. This was the change that was needed for it to be more "future proof". If you wanted to help vet it, and iterate on some of the issues that come up, i could assist. it's much simpler in its premise, so the theory is it would be easier for people to assist. I just moved to the devops side, and the company i work for switched to react (😢) so I haven't had the time, and personal life has been filled up so haven't had time to work on it.