Closed kyumoon closed 2 years ago
Hi, thanks for your PR! I'm not sure about this solution. If you'd go back 2 folders, for example, it still won't work.
How do you access the svg icons? Something like ../../package-common/src/asset/svg/common.svg
? In that case, we could maybe add a rule when the path starts with ../
then it should not be treated as 'root' url.
Hi, you are right.
if i use ../../
. it's not working still.
my PR only works if it starts with ../
i use allias common
it works like ../
ex) common/assets/svg/icn_map.svg
change to /Users/shane/Desktop/git/project/package-common/src/assets/svg/icn_map.svg
in my case:
root: /Users/shane/Desktop/git/project/package-a
id: /Users/shane/Desktop/git/project/package-common/src/assets/svg/icn_map.svg
Actually, I don't know why you check isRootRef and I want you to remove it if possible. In the case of vue-svg-loader, similar conditions do not exist.
You're right, I've removed the check and added a better solution in v3.4.0
Thanks for your help!
There is a problem using the plugin in a monorepo environment. svg files do not run on the plugin because the isRootRef value is true when referring to the svg file in a different directory.
If there is no issue, I hope the pull request will be accepted. thank you