In the second example that you have, there is an asterisk * sitting in the open state - this is not a string. This is why it reports an error.
The docs indicate that the default is to save all special comments. If you go to clean-css , you will see that special comments refer to comments that have an exclamation mark ( ! ) To indicate that they are important . Try changing your comment to look like this, and I'm sure it will save it without any configuration.
If Wordpress is unable to work with the special comment, for some reason you can use gulp-replace to fix the comment before saving it, for example:
var replace = require('gulp-replace'); // ... sass, compress-css, etc ... .pipe(replace('/*!', '/*')) // ... gulp.dest, etc ...
This will remove the exclamation mark from the comment. I would not do it if Wordpress did not work.
source share