Filewatcher to compile ES6 to ES5
I am using file watchers to compile less and minify js files and it works fine. Now I would like to use some features from Ecmascript 6 like import/export/class and then translate it to ES5. Is there any plugin which can run as file watcher to achieve this in PHPStorm?
Please sign in to leave a comment.
Sure, it's Babel; just install it (
npm install --save-dev @babel/core @babel/cli @babel/preset-env) and set up as a file watcher as described in https://blog.jetbrains.com/webstorm/2015/05/ecmascript-6-in-webstorm-transpiling/#setting-up-babel-file-watcher