jest-preview
jest-preview copied to clipboard
Emit type using rollup instead of using tsc directly
Is your feature request related to a problem? Please describe.
Currently, jest preview building process use tsc to emit types directly. It might get complicated if we need to generate types for multiple entries.
Describe the solution you'd like
- Generate types using
rollup - Need to be fast in watch mode, so
build:watchmight not need to generate types (if generating types in watch mode is fast, it's OK to leave it there).
Describe how should jest-preview implements this feature
- Use
rollupplugin to emit types - (Optional) Do not emit types in watch mode to save time
Image

Research to use tsup
Reference: https://github.com/mswjs/msw/pull/1247