Hi, I've searched on GitHub and online, also around Rollup and Esbuild but couldn't find what I want so here I am.
In my project (https://github.com/op-ent/unstyled-ui), I have a folder per component (see src/components
) that follows the structure:
/Component
- Component.tsx
- Component.types.ts
- ...
The Component.types.ts
file only contains types.
When building with tsup, empty chuncks are generated for such files:
// Button.types.mjs
// Button.types.mjs
"use strict";'use strict';
// Button.types.d.ts
import 'react';
import 'ts-essentials';
import '../../types/polymorphic.js';
export { c as ButtonComponent, B as ButtonCustomizableProps, a as ButtonLoadingOptions, b as ButtonProps, D as DefaultButtonProps } from '../../IconButton.types-8a550f35.js';
import '@zag-js/accordion';
So I'd like to get rid of the .mjs
and .ts
files automatically. I tried by renaming Component.types.ts
to Component.types.d.ts
but it didn't work.
How should I do? Thanks in advance for your answers.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too