Added “grunt-contrib-livereload”: “^0.1.2” to sass compile grunt config. Yes, it’s reloading, but whole DOM. Magento 2 native config reloader reloading just the styles, not page reload. How I can setup grunt in this way?
module.exports = function (grunt) {
const sass = require('node-sass');
const timer = require('grunt-timer');
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
timer.init(grunt, { deferLogs: true, friendlyTime: false, color: "blue" });
grunt.initConfig({
notify_hooks: {
options: {
enable: true,
title: 'Task Completed',
max_jshint_notifications: 5,
},
uncss: {
options: {
title: 'Task Completeddd',
message: "Error occured",
},
},
},
sass: {
dist: {
options: {
implementation: sass,
sourceMap: true,
message: "Less task complete"
},
files: {
'../../../../../pub/static/frontend/Laf/v1/en_US/css/quickview.css': 'styles/quickview.scss',
'../../../../../pub/static/frontend/Laf/v1/en_US/css/locations.css': 'styles/locations.scss',
}
}
},
watch: {
files: ['styles/*.scss', 'Magento_Cms/styles/*.scss'],
tasks: ['sass'],
options: {
livereload: true,
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-notify');
grunt.task.run('notify_hooks');
grunt.registerTask('default', ['sass', 'notify', 'livereload']);
};