grunt-contrib-watch icon indicating copy to clipboard operation
grunt-contrib-watch copied to clipboard

It's not watching for `.es6` files

Open felipepalazzo opened this issue 7 years ago • 0 comments

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',
        }]
      },
    },
  • npm 3.10.10
  • node v6.9.5
  • OS 10.12.1
  • grunt-contrib-watch 0.6.1
  • grunt-babel 6.0.0

felipepalazzo avatar Jul 03 '17 22:07 felipepalazzo