我在gruntfile.js上有这个简单的代码:
module.exports = function (grunt) { require("load-grunt-tasks")(grunt); // npm install --save-dev load-grunt-tasks grunt.initConfig({ babel: { options: { sourceMap: true },dist: { files: { "dist/app.js": ["src/app.js"] } } } }); grunt.registerTask("default",["babel"]); };
但是在运行时告诉我这个错误:
Warning: Task "babel" not found. Use --force to continue. Aborted due to warnings. Process finished with exit code 3
有帮助吗?切勿从ecmascript 6转换为5 原文链接:https://www.f2er.com/js/154702.html