previewjs icon indicating copy to clipboard operation
previewjs copied to clipboard

Plug in seems to cache old components

Open daver987 opened this issue 3 years ago • 4 comments

Describe the bug

I was able to get the plug-in set up and working on WebStorm, when I switched to another project it keeps giving an error that it can't find the component from the first project. I also tried it in VS code and its still looking for the same component. Input/text is from a separate project. Setup examples of the wrapper component would also be helpful. Both projects were Nuxt 3

Reproduction

[8:00:46 PM] Failed to resolve import "/components/Input/Text.vue" from "../../../../@component-loader.js?p=components%2FInput%2FText.vue&c=Text". Does the file exist?

Preview.js version

v1.13.0

Framework

Nuxt 3.0.0-rc.10

System Info

Jetbrains Webstorm and Idea Ultimate I also tried VScode

Used Package Manager

yarn

Preview.js logs (check bottom panel in IntelliJ)

No response

Browser logs (useful for rendering errors)

No response

Repo link (if available)

No response

Anything else?

Sorry I don't have the logs. I'm very excited about this project, it seems like its going to be very good for building components. :)

daver987 avatar Sep 07 '22 02:09 daver987

Thanks for reporting this @daver987 (and congrats on snatching issue no 999)! I haven't seen this bug before but I can see how that would be fairly annoying.

Preview.js itself doesn't cache anything and each workspace should be isolated from others, but it might be some automatic HTTP caching being too smart for its own good.

I'll try to reproduce, if you want to speed up resolution would you be able to provide a sample repo with two Nuxt3 projects that exhibit this issue?

fwouts avatar Sep 07 '22 03:09 fwouts

And yes, planning to add some docs to document suitable Nuxt/Next configs 🙂

fwouts avatar Sep 07 '22 03:09 fwouts

https://github.com/daver987/LuxuryRideService (addons branch) The is one I was starting to clean it up and refactor (Be kind it was literally my project from scratch.lol) But now that I think of it, I've been having a few errors where parts of one project are showing up in errors in other projects. I'm using a M1 MacBook Pro, and mostly Webstorm and almost exclusively Nuxt3

daver987 avatar Sep 07 '22 03:09 daver987

Maybe I don't have something set up correctly, I've also been getting weird failed to resolve this component or this module with vite, it's looking for things that aren't there.

daver987 avatar Sep 07 '22 03:09 daver987

That is very strange! I've cloned the repo on that branch but haven't been able to reproduce. If you have more specific instructions aside from using that branch, I'd appreciate it 👍

fwouts avatar Sep 22 '22 04:09 fwouts

Closing this issue as unable to reproduce, feel free to reopen with more information :)

fwouts avatar Oct 04 '22 23:10 fwouts