gruntjs / grunt-contrib-watch

Run tasks whenever watched files change.
http://gruntjs.com/
MIT License
1.98k stars 356 forks source link

It's not watching for `.es6` files #545

Open felipepalazzo opened 7 years ago

felipepalazzo commented 7 years ago

Hi!

I've created a task to transpile .es6 files using grunt-babel, but somehow it's not working. If I change the file extension (e.g. js), then task runs properly. Could anyone help me with that? I've already tried this and it didn't work so far.

watch: {
    babel: {
        files: ['<%= yeoman.client %>/{app,components,services}/**/*.es6'],
        tasks: [babel:dist],
    }
}

and task:

babel: {
      options: {
        sourceMap: false,
        presets: ['es2015']
      },
      dist: {
        files: [{
          expand: true,
          src: ['<%= yeoman.client %>/{app,components,services}/**/*.es6'],
          ext: '.js',
        }]
      },
    },