Home  >  Article  >  Backend Development  >  javascript - Regarding the configuration problem of grunt plug-in browserify, please help

javascript - Regarding the configuration problem of grunt plug-in browserify, please help

WBOY
WBOYOriginal
2016-08-18 09:15:331115browse

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

As long as you add transform: ['brfs'], an error will be reported. If you remove it, it will compile normally. What's going on?

<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>

Reply content:

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

As long as you add transform: ['brfs'], an error will be reported. If you remove it, it will compile normally. What's going on?

<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>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn