Open jimcoolbeans opened 8 years ago
can you try to fixed this? it seems no propblem when I set the output to a file path.
This problem can be seen when you run rollup in watch mode (rollup -c -w) When you modify the LESS file, the generated CSS file gets appended instead of being replaced.
If it helps at all, I've been seeing this on Windows only. Doesn't seem to have a problem on Mac.
in watch mode fileCount will up can't back to 0
I think this is related to #24
how can i insert the generate css to the head tag of an html document?i set insert as true, and output as "index.html". but the result is that the file of index.html was overwritten by generate css.
I checked the code and you can force the file to be truncated when you call the plugin with watch: true parameter:
less({output: out + '/app.css', watch: true})
If you set the output option to write a file the css is being appended to the existing file without clearing it first. node 6.8.1 and rollup 0.36.3
My guess would be an issue here:
fs.removeSync isn't executing (and I think it would also throw and error if it did?).