小编Che*_*dez的帖子

"警告:任务"babel"未找到.使用--force继续."

我在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"]);

};
Run Code Online (Sandbox Code Playgroud)

但是在运行时告诉我这个错误:

Warning: Task "babel" not found. Use --force to continue.

Aborted due to warnings.

Process finished with exit code 3
Run Code Online (Sandbox Code Playgroud)

有帮助吗?切勿从ecmascript 6转换为5 :(

我的文件:

http://www.mediafire.com/download/nabq78bs323u47b/DemoBable.zip

javascript webstorm gruntjs babeljs

9
推荐指数
1
解决办法
4880
查看次数

标签 统计

babeljs ×1

gruntjs ×1

javascript ×1

webstorm ×1