import requireDir from 'require-dir';
requireDir('./tasks');gulp.js写入上面代码,在cmd上运行时出现E:\webstorm-demo\es6>gulpE:\webstorm-demo\es6\gulpfile.js:1(function (exports, require, module, __filename, __dirname) { import requireDir from 'require-dir'; ^^^^^^SyntaxError: Unexpected token import at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:617:28) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Liftoff.handleArguments (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:116:3)
添加回答
举报
0/150
提交
取消