Giter Club home page Giter Club logo

Comments (4)

ntt261298 avatar ntt261298 commented on June 9, 2024 1

I think this approach is really promising. (Reduce the test running time, Be able to handle async tasks so we can scale easier in the future,…)
I still have some thoughts about this approach:

  • The time for the browser to fully load the CSS of the preview might be longer than current (But I think reducing the test running time is more important).
  • We might still need to transform CSS module in the transformer. As I understand, we still need to do the expensive task postcssrc() for every test. What if we process the CSS module in the Jest Preview Dashboard? Then it might take a much longer time for the browser to load CSS fully. (Not sure if the user has enough patience to wait for that). I think this is a trade-off.
  • Reducing the time of running postcssrc() might be the problem we need to solve for both approaches (current and new), but it’s probably the really hard one.

To summarize, I think it’s feasible to implement the new approach and will bring more pros than cons.

from jest-preview.

szamanr avatar szamanr commented on June 9, 2024 1

hi, is this on the roadmap? i would like to reduce the runtime in CI or make it only parse css based on some env variable. looks like this rewrite would solve that.

from jest-preview.

nvh95 avatar nvh95 commented on June 9, 2024

Hey @ntt261298, please see my note above on a new approach to handle CSS. It would be great if you can give some of your thoughts. Thanks.

from jest-preview.

nvh95 avatar nvh95 commented on June 9, 2024

[Just a note] This can fix #260

from jest-preview.

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.