這是我gulpfile.js的內容:奧裏利亞打捆gulp.js無法找到
var gulp = require('gulp');
var bundler = require('aurelia-bundler');
var config = {
force: true,
packagePath: '.',
bundles: {
"dist/app-build": {
includes: [
'Main.js',
],
excludes:[
"gulpfile.js",
],
options: {
inject: true,
minify: true
}
},
"dist/aurelia": {
includes: [
'aurelia-bootstrapper',
'aurelia-fetch-client',
'aurelia-router',
'aurelia-animator-css',
'github:aurelia/templating-binding',
'github:aurelia/templating-resources',
'github:aurelia/templating-router',
'github:aurelia/loader-default',
'github:aurelia/history-browser',
'github:aurelia/logging-console'
],
options: {
inject: true,
minify: true
}
}
}
};
gulp.task('bundle', function() {
console.log("ok");
return bundler.bundle(config);
});
當我運行一飲而盡捆綁出現下列錯誤:
[08:08:54] 'bundle' errored after 536 ms [08:08:54] Error on fetch for gulp.js at file:///C:/myapp/gulp.js Loading gulpfile.js Error: ENOENT: no such file or directory, open 'C:\myapp\gulp.js' at Error (native)
我wounder他爲什麼要在項目的根目錄中搜索gulp.js,而不是在node_modules文件夾中搜索?