I'm using the connect-assets module in a node app and cannot get it to work with sass using the node-sass module. I can get it to work with coffee script great.

In my server.coffee file I have

require "node-sass"

connectAssets = require 'connect-assets'

@_app.use connectAssets(src: __dirname + "/app/assets", jsDir: 'js', cssDir: 'css')

In my jade view I have: != css('reset')

I get the following error on page load: "No file found for route css/reset.css" This is the only sass file I've dropped in for testing and it's named per the documentation guides: reset.css.scss

I followed the exact same process for coffee files on the front end and it works great. I've also tried this with the less module as well and I get the same result. I'm I missing a step here? What little documentation I can find on this process makes it sound like a pretty trivial task to do so I'm not quite sure what I'm doing wrong.

有帮助吗?

解决方案

Unfortunately, connect-assets 2.x doesn’t support SASS. If you were feeling adventurous, you could add a compiler function for it like this LESS method.

Fortunately, SASS is supported in connect-assets 3.x — which is currently in alpha.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top