Giter Site home page Giter Site logo

Webpack loader about identity-obj-proxy HOT 5 OPEN

keyz avatar keyz commented on May 24, 2024
Webpack loader

from identity-obj-proxy.

Comments (5)

lucasconstantino avatar lucasconstantino commented on May 24, 2024 1

Hey, that's really cool! You guys are improving :) For sure this will fit most of my use cases. Anyway, I think there are still parts of Webpack that simply shouldn't be handled by Jest or any other tool. I mean, I can never really guarantee things will get done the same way by the both of them, Jest and Webpack.

Thanks for all the reply!

from identity-obj-proxy.

keyz avatar keyz commented on May 24, 2024

Hey, thanks for making this! Just curious, what are your use cases for this as a webpack loader?

from identity-obj-proxy.

lucasconstantino avatar lucasconstantino commented on May 24, 2024

When using Jest, you always have to fix a bunch of stuff Webpack takes care of; aliases, loaders, etc. It's very easy to use identity-obj-proxy directly as a mock for some kind of files such as .css, but you always get stuck with something else Webpack is doing which is hard to replicate on Jest. Therefore, sometimes it's easier to have a specific webpack file just for running tests, something that extends the default webpack configuration for you app. In this case, I'll use this loader to address .css files while testing.

Did it make sense?

from identity-obj-proxy.

keyz avatar keyz commented on May 24, 2024

Thanks. We just replaced Jest's scriptPreprocessor config with transform (jestjs/jest#1917), which is a mapping from extensions to transformer scripts. There's an example usage at jestjs/jest#2035. It might fit your needs better -- let me know what you think!

from identity-obj-proxy.

keyz avatar keyz commented on May 24, 2024

Thanks, let's keep this issue open for visibility.

from identity-obj-proxy.

Related Issues (11)

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.