Skip to content

Instantly share code, notes, and snippets.

@tp-hk
Last active March 19, 2023 23:52
Show Gist options
  • Save tp-hk/48dcc0530cbf0bc48e3b to your computer and use it in GitHub Desktop.
Save tp-hk/48dcc0530cbf0bc48e3b to your computer and use it in GitHub Desktop.
tips & tricks - set up Babel file watcher in WebStorm 11+ on Windows

Last modified

  • Jan 18, 2016. WebStorm 11.0.3

References

cd to project directory

  • npm install --save-dev babel-cli
  • npm install --save-dev babel-preset-es2015

At WebStorm

  • Settings > Tools > File Watchers > + Babel
  • Set program to be the full path to babel.cmd i.e. typically $ProjectFileDir$\node_modules\.bin\babel.cmd
  • Keep other default settings (or optionally set a custom scope to exclude node_modules dir)
  • Settings > Languages & Frameworks > JavaScript
  • Set JS version to ES6

At project dir

  • Create a config.babelrc file, add {"presets": ["es2015"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment