Seeking Ideas: Conflict between `vite-plugin-node-polyfills` and Service Worker in Astro

Hey everyone, Hope you're all having a great day. I'm facing a bit of a challenge with my Astro app and was hoping someone here might have encountered something similar. I'm using a library that requires Node polyfills for the browser. vite-plugin-node-polyfills gets the library working, but when I implement it, my Service Worker starts to break, specifically with an error related to the path polyfill (I suspect it has something to do with caching functions). I've also tried injecting the polyfills manually into the file where the library is used, but the library still throws an error about missing polyfills. Has anyone experienced this before, or do you have any strategies for handling this situation? Any insights or suggestions would be greatly appreciated. Thanks in advance for your time!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?