Due to repair problems caused by Gulp require cache in the watch can …#5
Due to repair problems caused by Gulp require cache in the watch can …#5aemoe wants to merge 2 commits intoposthtml:masterfrom
Conversation
…not update the bug
|
Thank you for your PR! Unfortunately, I cannot merge it as it's yet, because it's inefficient to invalidate the cache by each |
|
@maltsev thank you for your advise,i will try to find a better way that delete the cache of require.When I find, I will commit again. |
|
@maltsev See also,yesterday I use an other way to resolve this bug, it use Node file stream. Cause of the file load every times, the cache will refresh. Shortly after,i will submit. |
|
The issue is still here: by each iteration a file with CSS modules is being re-read and re-parsed. I was thinking about using some simple cache. Something like this: |
It'd allow running the plugin in gulp watch and other similar tools, where files with CSS modules might change between runs. Related issue: #5
|
I fixed this bug and published the new version. @aemoe please check if everything works fine for you. |
|
thank for fixed this bug~ |

Thanks for the author, thank you for your code.
When I use a gulp when using the watch mode, because of caching issues require cache, and update the json time, can not be read to json modified files, so I can not do it automatically updates results, so modified the code I hope you fixed.