The vite built assetUrl was incorrectly identified as a variable
ZhongxuYang opened this issue · 3 comments
ZhongxuYang commented
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?
ZhongxuYang commented
I bypassed the problem for now by setting unresolved: 'warn'
, which I'm not sure is a good way to go.
romainmenke commented
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.
ZhongxuYang commented
Okay, I see. Thank you for your reply~ 😊