You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using postcss in Vite with Vue components, processors gets run multiple times on different files, and imported from the same ES6 scope.
The opts list at the start of postcss-cachebuster prepends process.cwd() to both path options on each run, so only the first run will have correct paths - everything afterwards will have cwd() added to it multiple times.
There's an easy fix - put the results of those prepends in opts.imagesPathResolved and opts.cssPathResolved and reference those in the code instead.
The text was updated successfully, but these errors were encountered:
When using postcss in Vite with Vue components, processors gets run multiple times on different files, and imported from the same ES6 scope.
The opts list at the start of postcss-cachebuster prepends
process.cwd()
to both path options on each run, so only the first run will have correct paths - everything afterwards will have cwd() added to it multiple times.There's an easy fix - put the results of those prepends in
opts.imagesPathResolved
andopts.cssPathResolved
and reference those in the code instead.The text was updated successfully, but these errors were encountered: