Coder Social home page Coder Social logo

Comments (6)

dai-shi avatar dai-shi commented on August 21, 2024 1

Thanks for reporting.
If umd.js is an issue, can you try the resolver?
https://jestjs.io/docs/configuration#resolver-string

By combining defaultResolver and packageFilter we can implement a package.json "pre-processor" that allows us to change how the default resolver will resolve modules. For example, imagine we want to use the field "module" if it is present, otherwise fallback to "main":

...but, that's just a workaround. I wonder how we could solve this without such a workaround. help wanted. (this issue is probably not only with use-context-selector but with all my other packages with microbundle.)

from use-context-selector.

gsevla avatar gsevla commented on August 21, 2024

It worked!

Thanks for the answer.

I readed about the problem, but have no ideas to solve it, sorry (have no expertise with bundlers)

from use-context-selector.

dai-shi avatar dai-shi commented on August 21, 2024

Good to hear that.

No problem. Let's leave this issue open for a while in case someone jumps in.

from use-context-selector.

BrunoADPaixao avatar BrunoADPaixao commented on August 21, 2024

Thanks for reporting. If umd.js is an issue, can you try the resolver? https://jestjs.io/docs/configuration#resolver-string

By combining defaultResolver and packageFilter we can implement a package.json "pre-processor" that allows us to change how the default resolver will resolve modules. For example, imagine we want to use the field "module" if it is present, otherwise fallback to "main":

...but, that's just a workaround. I wonder how we could solve this without such a workaround. help wanted. (this issue is probably not only with use-context-selector but with all my other packages with microbundle.)

I'm having the same error. Using this solution now a have the same error but with the index.modern.js. Any sugestion?

from use-context-selector.

dai-shi avatar dai-shi commented on August 21, 2024

So, is this the problem with RN + jest? It works with RN only and maybe React (web) + jest, doesn't it?

from use-context-selector.

mtroskot avatar mtroskot commented on August 21, 2024

@gsevla can you post the workaround steps how to fix the issue?

from use-context-selector.

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.