我不断收到 UNCSS 的这个错误:'Warning: Destination (dist/css/main.css) not written because src files were empty. Use --force to contine. Aborted due to warnings.
我相信它可以正常运行任务并且设置正确。我可以将 grunt 用于其他事情。
在 gruntfile.js 中,我包括:grunt.loadNpmTasks('grunt-uncss');
和
uncss: {
dist: {
files: {
'dist/css/main2.css': ['../index.html']
}
}
}
我不确定出了什么问题,但我认为这是路径,但事实就是如此。我也在使用 SCSS,所以也许它需要一个原始的 css as SRC
?我已经尝试在没有 Grunt 的情况下重新安装 PhantomJS 和原始 UNCSS,但我无处可去!有任何想法吗?