Ignore test files while building
Open
need repro
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to build a library using `tsup`. But I can not ignore test files
When setting `external: [/\.test\./],`, I get errors
```
The entry point "./src/...-wrapper.test.tsx" cannot be marked as external
```
If I don't ignore, I get following error
```
error TS2339: Property 'media' does not exist on type 'Window & typeof globalThis'
```
All my tests are working well, and I have configured all global in `vitest-setup.ts` file
How to fix the build?
Contributor guide
Assessment
This issue has not been assessed yet.