Giter Site home page Giter Site logo

Comments (2)

Scott-Fischer avatar Scott-Fischer commented on May 24, 2024 1

upgrading @ladle/react requires updating msw due to the peer dependency

msw is a direct dependency of Ladle and there are no other packages/peerDeps? I don't understand why you couldn't install msw@1 next to Ladle?

You're right, I was able to do this eventually, it just wasnt quite as intuitive as I thought. When first upgrading my version of ladle, it was automatically updating msw and generating a new mockServiceWorker.js file. If anyone else ends up in this situation, you can resolve it by uninstalling msw after upgrading ladle then reinstalling msw at the version of v1 that you want.

Btw, we are also using Jest + MSW2. It's not that difficult to setup, just need to make sure that you give back fetch and other native APIs that Jest is hiding.

I took some time and worked though this as well and was eventually able to restore functionality in jest with v2.

Thanks for the advice, I'll go ahead and close this issue.

from ladle.

tajo avatar tajo commented on May 24, 2024

upgrading @ladle/react requires updating msw due to the peer dependency

msw is a direct dependency of Ladle and there are no other packages/peerDeps? I don't understand why you couldn't install msw@1 next to Ladle?

Btw, we are also using Jest + MSW2. It's not that difficult to setup, just need to make sure that you give back fetch and other native APIs that Jest is hiding.

the msw implementation be created as an independent plugin

I am really trying to avoid that. The setup is not straightforward and supporting both MSW1+2 would add a lot of maintenance burden as well.

from ladle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.