Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@import "file.css" from asset pipeline #56

Closed
rweng opened this issue Mar 28, 2013 · 1 comment
Closed

@import "file.css" from asset pipeline #56

rweng opened this issue Mar 28, 2013 · 1 comment
Labels

Comments

@rweng
Copy link

rweng commented Mar 28, 2013

Hi,

maybe it's too late and I don't see the obvious:

I have two projects that use

 less-rails (2.3.2)
      less (~> 2.3.1)

However, one project includes @import "morris.core.css"; during assets:precompile, the other leaves it and thus tries to fetch it in production mode.

The files are named the same (application.less), production config is same, and I tried to clear cache at both files with no success. Which one is the "normal" behavior? Any idea why the projects could differ?

Help is greatly appreciated :)

@rweng
Copy link
Author

rweng commented Mar 29, 2013

Alright, I am still not sure why it fails in the one project and works in the other. I know less itself just keeps @import *.css, but I thought less-rails substitutes with the help of the asset pipeline.

Anyhow, the workaround is putting all your sprocket css files in a sprocket.css, add this to asset pipeline precompile list and then include this css. It will still remain a normal @import after precompilation, but at least this file can then be resolved and included at runtime.

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

No branches or pull requests

2 participants