Loving Coding & Visual Design

Grunt Build Error: require.js blocks are no more supported

When I use Yo to test Backbone webapp, I get thie error:

Running "useminPrepare:html" (useminPrepare) task
Fatal error: require.js blocks are no more supported.

According to the discuss in grunt-usemin, I update Gruntfile.js with requirejs.dis.options:

Insert the following options:

,
include: '../bower_components/requirejs/require',
mainConfigFile: yeomanConfig.app + '/scripts/main.js',
out: yeomanConfig.dist + '/scripts/app.min.js'


Then update index.html in app category from





to








The problem should be resolved.

And after build app to dist category, don't forget to change index.html, use app.min.js to replace requirejs/require.js.



下一页


最 近 文 章

  1. Xcode6.3出错NSString is not implicitly convertible to String - Tue, 14 Apr 2015 14:37:47 +0000
  2. Jquery Ajax Parsererror: Unexpected end of input - Fri, 10 Apr 2015 05:43:22 +0000
  3. To Anyone Wanna Buy My Domains - Mon, 23 Mar 2015 15:41:22 +0000
  4. PHP出错:json_encode: Invalid UTF-8 sequence in argument - Thu, 19 Mar 2015 15:55:52 +0000
  5. spmjs运行构建命令出错 - Fri, 06 Mar 2015 07:35:56 +0000
  6. 再次把博客移回国内 - Thu, 29 Jan 2015 14:25:34 +0000
  7. Virtualbox安装window10的64位预览版错误 - Fri, 26 Dec 2014 04:47:24 +0000
  8. Grunt Build Error: require.js blocks are no more supported - Mon, 22 Dec 2014 06:00:16 +0000
  9. Mysql5.7 start mysqld.service失败的问题 - Wed, 17 Dec 2014 17:30:17 +0000
  10. PHP5.4.35的php_curl.dll问题 - Tue, 16 Dec 2014 15:11:43 +0000