但是,用 Punch 的说法,我不确定这是否符合编译器、压缩器等的条件。我已经尝试了上述所有方法,但均无济于事。
这是我最近尝试使任何工作正常进行的尝试:
./autoprefixer.js
module.exports = {
input_extensions: [".css"],
force_compile: true,
compile: function(input, filename, callback){
return callback(null, "*{color: red;}");
}
};
config.json
...
"plugins": {
"compilers": {
".css": "punch-sass-compiler",
".css": "autoprefixer"
}
}
...
result
/home/peter/projects/website/node_modules/punch/lib/asset_bundler.js:62
if (compiler && compiler.input_extensions.indexOf(template_extension) > -1)
^
TypeError: Cannot read property 'indexOf' of undefined
at /home/peter/projects/website/node_modules/punch/lib/asset_bundler.js:62:45
at /home/peter/projects/website/node_modules/punch/lib/template_handler.js:119:11
at fs.js:334:14
at /home/peter/projects/website/node_modules/punch/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:42:10
at FSReqWrap.oncomplete (fs.js:95:15)
谁能引导我朝着正确的方向前进?