我正在尝试将 reactify 转换器添加到 browserfy:
var elixir = require('laravel-elixir');
elixir.config.js.browserify.transformers.push({
name: 'reactify',
options: {}
});
elixir(function(mix) {
mix.sass('app.scss');
mix.browserify('App.js');
});
我得到这个错误:
TypeError: Cannot read property 'browserify' of undefined
at Object.<anonymous> (/Users/carlo/Dev/jscomix/gulpfile.js:15:17)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:192:16)
at module.exports (/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
似乎未设置配置变量。任何人都可以在代码中看到任何错误吗?