Comments (4)
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.
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.
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.
[Just a note] This can fix #260
from jest-preview.
Related Issues (20)
- Cannot process CSS modules in CRA
- Work with @vue/test-utils instead of @testing-library/vue HOT 3
- Don't use hard-coded localhost for websocket HOT 6
- Importing @tailwindcss/utilities in CSS file causes ENOBUFS error HOT 3
- For a CRA app after following the instructions I got "sass not found. please install sass and try again." HOT 2
- No console.log or debugger HOT 2
- Having dependabot alerts: Got allows a redirect to a UNIX socket HOT 2
- Cannot bundle `update-notifier@6` (ESM only) to CommonJS using RollupJS
- Usage with React Native Web? HOT 5
- Can we save the "debug" preview as an image snapshot? HOT 1
- Add sass-resources-loader type functionality for loading SASS files HOT 11
- Auto previewing does not work when running a single test with WebStorm/IntelliJ HOT 4
- Make autoimporting `debug` recognized by vscode
- Tailwind arbitrary classes are not rendered properly
- Support VSCode extensions
- TS2694: Namespace 'Config' has no exported member 'PrettyFormatOptions'.
- Make a new release HOT 2
- Error 'Can't find stylesheet to import' with CSS Modules with SCSS
- Multiple CSS variables as inline style
- Errors reported as recorded video to be used in CI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest-preview.