Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paths in opts are broken if cachebuster called multiple times #113

Open
betterthanclay opened this issue Jan 4, 2023 · 0 comments
Open

Comments

@betterthanclay
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant