-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a fully functional app from snapshot #84
Comments
Idea: This way, users can still see the HTML immediately after <script type="module" src="/src/index.tsx"></script> We need to modify Preview Server in Simple explanation: We will have a Vite app, but not the fixed How about other frameworks? |
Vite supports creating a server of our own. I see the light at the end of the road!! |
To achieve this, we need to
One useful resource: |
Is your feature request related to a problem? Please describe.
This feature request is motivated by #62. When jest preview couldn't show an Image component from NextJS in Jest Preview. The reason is that Image Component requires javascript to be loaded.
So the question is. Can we make Jest Preview shows a fully functional app on browser?
Describe the solution you'd like
Instead of just a static HTML page, Jest Preview can serve a fully functional/ interactive SPA in the browser
Describe how should jest-preview implements this feature
Have no idea. This is a very hard problem. Need to understand how Jest process javascript, bundling (if they do?) (might be to see the Jest cached in cache folder?)
Describe alternatives you've considered
next.config.js
toReference: vercel/next.js#19065
Image
![Screen Shot 2022-04-24 at 14 08 27](https://user-images.githubusercontent.com/8603085/164963874-147fb6ec-b19b-48c6-a58e-5dd18dfd6021.png)
The text was updated successfully, but these errors were encountered: