vuejs / vueify

Browserify transform for single-file Vue components
MIT License
1.17k stars 152 forks source link

lru-cache in style-rewriter prevents proper function with gulp-watch and postcss plugins #206

Open teleclimber opened 7 years ago

teleclimber commented 7 years ago

style-rewriter.js makes use of a lru cache to avoid reprocessing CSS unnecessarily.

Unfortunately if you use additional PostCSS plugins and you depend on gulp.watch or similar to re-process your files as needed the lru cache prevents recompilation when recompilation is necessary.

In my case I use postcss-mixins with the mixinsDir option. I have all my mixins in a separate directory. Unfortunately vuefiy is not aware of this mixin dir, therefore on re-runs of vueify triggered by gulp-watch, the cached version of the processed CSS gets returned if all I changed was a mixin.

I disabled the lru cache in my fork of vueify and this fixes the problem.