Grunt Critical CSS 在 Drupal 7 站点上有问题

问题描述

When grunt criticalcss is run

运行“criticalcss:article”(criticalcss)任务 [D] 任务来源:/var/www/urbanmelbourne/node_modules/grunt-criticalcss/tasks/criticalcss.js phantomjs 出了点问题... 致命错误:幻影错误:ReferenceError:找不到变量:符号

跟踪:

-> http://local.urban.com.au/sites/all/libraries/jquery.event.move/js/jquery.event.move.js?qscytd:83

-> http://local.urban.com.au/sites/all/libraries/jquery.event.move/js/jquery.event.move.js?qscytd:31

这是我的 Gruntfile.js(在站点的根目录中)

var extend = require('extend');

module.exports = function (grunt) {
  grunt.initConfig({
    criticalcss: {
      article: {
        options: {
          url: 'http://local.urban.com.au/news',width: 1400,height: 900,filename: 'sites/all/themes/urbanmelbourne/css/pages/article.css',outputfile: 'sites/all/themes/urbanmelbourne/css/pages/critical-article.css',ignoreConsole: false
        }
      }
    }
  });

  grunt.loadNpmtasks('grunt-criticalcss');
  grunt.registerTask('default',['criticalcss']);
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)