Skip to content

Types are not bundled propertly #5025

@aadamcik

Description

@aadamcik

UnoCSS version

66.5.11

Describe the bug

The types for all packages are currently not bundled properly. Each package contains types from common packages as well and does not use imports in type definitions.

For example @unocss/preset-mini contains all types from @unocss/core, see https://www.npmjs.com/package/@unocss/preset-mini?activeTab=code .

This is probably bug in tsdown as listing the dependencies explicitly in tsdown.config.ts fixes the problem:

export default defineConfig({
  // ...
  external: ['@unocss/core', '@unocss/extractor-arbitrary-variants', '@unocss/rule-utils'],
})

Reproduction

Run build in any unocss package and see type files.

System Info

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions