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:
According to the discuss in grunt-usemin, I update Gruntfile.js with requirejs.dis.options:
Insert the following options:
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.
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.
最 近 文 章
- 把reactjs升级到15.5.4 - 2017-05-24T15:04:15.880Z
- 关于SSL证书 - 2017-05-03T16:40:33.137Z
- 关于小朋友和游戏 - 2017-04-09T08:38:25.592Z
- 小程序不全面自由开放只有死路一条 - 2017-03-29T14:49:25.034Z
- Xcode6.3出错NSString is not implicitly convertible to String - Tue, 14 Apr 2015 14:37:47 +0000
- Jquery Ajax Parsererror: Unexpected end of input - Fri, 10 Apr 2015 05:43:22 +0000
- To Anyone Wanna Buy My Domains - Mon, 23 Mar 2015 15:41:22 +0000
- PHP出错:json_encode: Invalid UTF-8 sequence in argument - Thu, 19 Mar 2015 15:55:52 +0000
- spmjs运行构建命令出错 - Fri, 06 Mar 2015 07:35:56 +0000
- 再次把博客移回国内 - Thu, 29 Jan 2015 14:25:34 +0000