Edit Page

tasks/config/babel.js

This file configures a Grunt task called "babel".

This task is used to transpile any ES8, ES7, and ES6 syntax in your front-end JavaScript files for compatibility with older browsers.

(By default, only .js files in the assets/js/ folder and subfolders will be transpiled. If you need other things transpiled, such as assets/dependencies/, you'll need to modify the configuration of this task accordingly.)

For additional usage documentation, see grunt-babel.

Want to see for yourself?

An example of this file can be found in our sample app repo, here.

Anatomy of a Sails App