egoist / egoist/tsup

Ignore test files while building

Open
#986 6 comments 5 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.