Closed gorbit99 closed 1 year ago
Nice extension! I tried replicating your issue, so let me double check I understand. I only tried a couple of files for one of your additionalInputs
.
src/monkeyPatching/fetch.ts
, which is listed in your additionalInputs
, it rebuilds correctlysrc/injectMessaging.ts
, which is imported by the fetch file, it rebuilds correctlysrc/wanikani/item/types.ts
, it doesn't reloadThat said, you're only importing a type from the types.ts
file, so I assume Vite is ignoring changes from that file, since it doesn't effect the final bundle. Once esbuild strips out all the types, that import doesn't exist anymore, so Vite probably has no idea that import is even in your source code.
Is there a different set of files I can reproduce it with?
I don't think it's set in stone when and where this happens. Sometimes I just notice, that saving a file doesn't trigger a rebuild, and sadly it's not type-only files that do this. It might even happen after a while, I'm not sure. Right now I can't find a single file that's doing it I don't think, so I'll get back to you once I find something.
I'm gonna close this, let me know if you can reproduce this consistently. And I'll look into this.
Hey! For some reason, sometimes when I save a file that's part of the extension, it doesn't trigger a build in vite. The only workaround I've found is to then force save another file. I think this happens only for files set as "additionalInputs". For example right now I have a file that's eventually imported from a file that's in that list, and it refuses to build. But if I go one level up, it for some reason works fine. Is this known, or is there a fix for this?
This is my project: https://github.com/gorbit99/wics-extension