开发者

How to use SCSS with Express ? (Node.js)

Is there any way to use SCSS with Express ?

I tried with :

app.use(express.compiler({ src: __dirname + '/publi开发者_运维技巧c', enable: ['scss'] }));

But it gives me an error :

DEBUG: TypeError: Cannot read property 'match' of undefined

Thanks


There is no way you can use it that way i.e. as a built in module. The author of ExpressJS himself said that it is not possible. I was having the same problem and found out that you either had to use SASS.js or LESS.
Refer this: https://github.com/visionmedia/express/issues/787
I recommend you to use Stylus!


Take a look @ Node-sass -- NPM Package | Github

This is a wrapper around the C/C++ library libsass.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜