Replies: 1 comment
-
Hey, @Flui. While I understand your concern, MSW is a devtool, and its dependencies are bound to the goals it accomplishes. I understand you may not use GraphQL mocking in your project. Yet the price you pay for installing an extra package is rather small. In a similar fashion, we're installing packages to manage cookies, which you may not mock. There's no agreed way to modularize libraries in Node.js, so you will end up installing more than you may potentially use and it's fine. If you get a warning from a tool you're not using, you can just ignore that warning. The one you're getting is interesting though, because it suggests you're using TypeScript < 4.1.0. MSW requires TypeScript 4.3 to run, so you have to update TypeScript if you want to use MSW without issues.
|
Beta Was this translation helpful? Give feedback.
-
Scope
Adds a new behavior
Compatibility
Feature description
Is your feature request related to a problem? Please describe.
Currently I am working on an Project with [email protected] and [email protected]. After installing latest version of msw I get the following typescript error:
"Package 'graphql' support only TS versions that are >=4.1.0"
As I am consuming a rest api via fetch, there is no need for me here to even install graphql.
Describe the solution you'd like
So I would like to install msw with the minimal required dependencies to use it for rest apis.
Describe alternatives you've considered
If somebody has a workaround without updating typescript I would appreciate that as well.
Beta Was this translation helpful? Give feedback.
All reactions