1.npm 安装babel (全局安装)
npm install -g babel-cli
2.npm安装babel的preset(文件夹下)
npm install –save-dev babel-preset-es2015
3.工程路径新建.babelrc文件,内容如下:
{
“presets”:[
“es2015”
]
}
4.配置File Watcher
5.配置Arguments参数:
$FilePathRelativeToProjectRoot$ –out-dir dist –source-maps –presets es2015