jest-preview icon indicating copy to clipboard operation
jest-preview copied to clipboard

Emit type using rollup instead of using tsc directly

Open nvh95 opened this issue 3 years ago • 1 comments

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:watch might 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 rollup plugin to emit types
  • (Optional) Do not emit types in watch mode to save time

Image image

nvh95 avatar Apr 24 '22 07:04 nvh95

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

nvh95 avatar May 26 '22 11:05 nvh95