underfin / vite-plugin-vue2

Vue2 plugin for Vite
621 stars 84 forks source link

No corresponding SFC entry in the cache. #129

Closed zcmk123 closed 3 years ago

zcmk123 commented 3 years ago

https://github.com/underfin/vite-plugin-vue2/blob/6fa3cd0beae76e5415fb7509681e76b98b4c4417/src/utils/descriptorCache.ts#L29

i come across to this issue so i debug descriptorCache.ts this file, inside cache i found some path is windows pattern (i'm windows user) after check my vite config, i realize those path are all alias path.

windows path pattern are different from linux windows: E:\\devProject\\admin-vue2\\common\\xxxxx unix: E:/devProject/admin-vue2/common/xxxxx

so i think, filename should replace '\' to '/' when set the cache

cache.set(slash(filename), descriptor);

image