Closed sh-ravan closed 1 year ago
Hey @sh-ravan,
Thanks for reporting the issue 🙏 , I managed to reproduce and this is related to the subpath exports.
I'm looking into it and will publish a fix asap but in the meatime you should be able to import from the nested files instead of the index:
import { retry } from "wretch/middlewares/retry"
Ah, thanks for the quick resolution mate!
Also, heckin cool library. Good riddance axios :P
Also, heckin cool library. Good riddance axios :P
Haha thanks! 😄
I just released wretch@2.3.1
which should solve the issue, importing from wretch/middlewares
and wretch/addons
should be working now 🤞.
I just tested it, the new version works perfectly! ⚡
I can't get the built-in middleware to work in my Vite project. I have
"wretch": "^2.3.0"
installed but when I try to build it, it throws an error that says,Rollup failed to resolve import "wretch/middlewares"
. Looks like it's something to do with the bundler as it can be reproduced in both these places:https://stackblitz.com/edit/vitejs-vite-cbj21z https://codesandbox.io/p/sandbox/competent-elbakyan-129ojg