首页 >后端开发 >php教程 >javascript - 关于grunt插件browserify配置问题,求助

javascript - 关于grunt插件browserify配置问题,求助

WBOY
WBOY原创
2016-08-18 09:15:331170浏览

<code> browserify: {
      options: {
        transform: ['brfs'],
        debug: true
      },
      debug: {
        files: {'build/test.min.js': 'src/test.js'},  
      }
    }
    </code>

只要加了transform: ['brfs'],就会报错,去掉就能正常编译,什么情况啊?

<code>$ grunt
Running "browserify:debug" (browserify) task
>> TypeError: Cannot read property 'apply' of undefined while parsing file: X:\Users\javascript\Desktop\LEARN\learn_grunt\src\test.js
Warning: Error running grunt-browserify. Use --force to continue.

Aborted due to warnings.
</code>

回复内容:

<code> browserify: {
      options: {
        transform: ['brfs'],
        debug: true
      },
      debug: {
        files: {'build/test.min.js': 'src/test.js'},  
      }
    }
    </code>

只要加了transform: ['brfs'],就会报错,去掉就能正常编译,什么情况啊?

<code>$ grunt
Running "browserify:debug" (browserify) task
>> TypeError: Cannot read property 'apply' of undefined while parsing file: X:\Users\javascript\Desktop\LEARN\learn_grunt\src\test.js
Warning: Error running grunt-browserify. Use --force to continue.

Aborted due to warnings.
</code>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn