Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Can Breakfast/Brunch co-exist with Sprockets? #33

Open
evenreven opened this issue Sep 7, 2019 · 2 comments
Open

Can Breakfast/Brunch co-exist with Sprockets? #33

evenreven opened this issue Sep 7, 2019 · 2 comments

Comments

@evenreven
Copy link

I've recently been working with converting a project gradually from Sprockets to Webpacker, but I'm getting frustrated, and finding Webpack messy, counter-intuitive and full of weird, barely-documented "features".

So I'm trying Breakfast, and it seems promising, but I can't get it to work and Rails complains about app.css not being in the asset pipeline. Could it be that it's because I still have a few assets that are handled by Sprockets? Webpacker and Sprockets can happily co-exist, but since Breakfast uses the same stylesheet_link_tag, I'm starting to suspect this is not the case with Breakfast?

Sorry if this is obvious, but I can't find any mention of this in the docs.

(I think the fact that Breakfast's running as a sub-process of rails s and that it's using the same stylesheet and javascript tags for Rails views are strengths, but I can see if it makes co-existing with Sprockets difficult, and it would make converting my project step by step much harder, sadly.)

@PatKoperwas
Copy link
Contributor

Hey, I've used both side by side and it worked out pretty well. What version of Rails are you running? Last time I tried this was an early 5.x or maybe a late 4.x version of Rails, and I suspect there's a few things I might need to patch up.

@evenreven
Copy link
Author

evenreven commented Sep 10, 2019

I'm on Rails 5.1.7. Could be that I'm the one doing something wrong. I'll do some more testing.

But, logically, with the same magic keyword (stylesheet_link_tag), wouldn't Sprockets give me an error message regardless? I suspect I'm not even reaching Breakfast because Sprockets fails looking for app.css.

Inversely, how would I even use the Sprockets' application.css?

Sprockets is pretty strict in that manifest files that are called with stylesheet_link_tag has to exist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants