gulp prod 时一直报这个错,搞了好久,发现是gulp requirejs 插件的问题
package.json 里 "requirejs": "^2.1.20" , 用2.1.20没有问题,2.2 就报错,
难道是配置写法有问题?????
gulp.task('require', function(taskReady) { var requirejsConfig = { baseUrl: './src', name: 'js/main', paths: {}, optimize: 'uglify',//'uglify'; mainConfigFile: './src/js/require_config.js', out: './dist/build/js/main.js', //Inlines the text for any text! dependencies, to avoid the separate //async XMLHttpRequest calls to load those dependencies. inlineText: true, //Allow "use strict"; be included in the RequireJS files. useStrict: true, //Finds require() dependencies inside a require() or define call. findNestedDependencies: true }; requirejs.optimize(requirejsConfig, function () { taskReady(); }, function (err) { console.log(err); taskReady(); }); });
待确认,为什么这么多奇怪的问题,浪费时间,最后大都发现就是某个版本的问题, 。。。够。。。