Less grunt watcher not updating css

I have the following gruntfile.js code:

less: {
   development: {
      files: [{
         expand: true,
         cwd: 'assets/less',
         src: ['*.less'],
         dest: 'wwwroot/content/css/',
         ext: '.css'
      }]
   }
},
watch: {
   less: {
      files: ["assets/less/*.less"],
      task: ["less:development"]
    }
};


grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");

When I run the scan task and make changes to any of my smaller files, it detected changes in fewer files:

The file "assets \ less \ abc.less" has been modified.

But the problem is that it does not update my abc.css file. Does anyone know why this is and how to fix it? Thanks

+4
source share
1 answer

Hehe ... just another question with this problem, and this is the same problem:

watch: {
   less: {
      files: ["assets/less/*.less"],
      tasks: ["less:development"]    // <-- note that this is PLURAL! :)
    }
}
+2
source

Source: https://habr.com/ru/post/1568276/


All Articles