Open yinxin630 opened 7 years ago
Emmmmm... It seems vue-loader use JSON.stringify
to parse option from object to query for its template. I'll follow up later and maybe you can try postcss-loader and pxrem first. See vue-loader with postcss.
And if you have some good ideas to resolve the question, PR is welcomed 🙂
Let the filter accept the string type parameter. In the loader to detect whether the string type. Yes, then turn it into a regexp. This can solve the problem. Do you think this is a good idea?
Yes it works. But I prefer to use filter as function instead of regex. Regex cannot resolve the scene when I need to filter a pack of selectors, such as .should-use-px__xxxx
, and function works well.
In vue-loader. It will use
JSON.stringify
convert options to string. "filter" with regexp type will befilter: {}
. And with function type will remove it.