webstorm设置babel

https://babeljs.io/docs/setup/#webstorm

Installation

$ npm install -g babel-cli

3Usage

In Preferences | Tools | File watchers, click + button and select Babel file watcher from the list.

Specify the path to Babel executable and click Ok.

By default all files with .js and .jsx extensions will be automatically compiled with Babel upon change. The generated ES5 files and source maps will be saved next to original files.

Lastly, in Languages & Frameworks | JavaScript | JavaScript language version, choose ECMAScript 6.

For more information see the post in the WebStorm blog.



你可能感兴趣的:(webstorm设置babel)