I'm using postcss-cachebuster@0.1.3 and I have css file with two imports:
@import "file1.css";
@import "file2.css";
First import is processed properly, but the second one throws an error:
TypeError: Cannot read property '1' of null
at walkThroughtImports (C:\projects\my-project\node_modules\postcss-cachebuster\index.js:84:26)
It is caused because walkThroughtImports() uses regexp with 'g' flag but do not reset the lastIndex back to 0 after first usage. Adding pattern.lastIndex = 0; before calling pattern.exec(atrule.params) solves the problem.