amd-optimize

使用amd-optimize 打包amd规范的js代码,报错如下:

events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: No file for module 'handlebars' found.


其中handlebars文件其实是写到了页面中的script标签中的,在require_config.js中的配置是


require.config({
   /*requre config*/
    baseUrl: "http://js.xxx.com/channel/www/",
    paths:{
        'handlebars':'http://js.xxx.com/handlebar.min',
          }
});
并把require_config.js这个配置文件传入了amd-optimize的options中,
'configFile':path.join('xxx/require_config.js'),
这么写是错误了,应该写成'handlebars':'empty:',因为这个handlebars是在sript标签中单独引入的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值