csstools/postcss-advanced-variables

The vite built assetUrl was incorrectly identified as a variable

ZhongxuYang opened this issue · 3 comments

I'm having this problem with a project built with Vite.

It looks like postcss-advanced-variables is mistakenly recognizing the $ in the vite-assetUrl as a variable.

Error Message:

Could not resolve the variable "$__" within "url(__VITE_ASSET__5ZMNavF$__)"

Maybe it's a bug? Or do you have any other suggestions?

I bypassed the problem for now by setting unresolved: 'warn', which I'm not sure is a good way to go.

Hi @ZhongxuYang,

I think setting unresolved: 'warn' is a good way to get around this issue.

At its core you are seeing a conflict between two non-standard plugins/libs.
This is not something that is easily solvable by either without sacrificing functionality.

Okay, I see. Thank you for your reply~ 😊