Skip to content

types: export = in @tailwindcss/postcss contradicts exports.import in package.json #20219

Description

@SisyphusZheng

Problem

TypeScript 6.0 (shipped in Deno v2.8.3) changed export = in ESM context from a warning (TS1203) to a hard error (TS1192). This causes deno check to fail when importing @tailwindcss/postcss.

Root Cause

@tailwindcss/postcss@4.1.16's package.json declares ESM support via exports.import, but the type declarations in dist/index.d.ts use CJS syntax:

declare const _default: PluginCreator<PluginOptions>;
export = _default;  // CJS, not ESM export default

With moduleResolution: NodeNext, TS 6.0 sees exports.import -> treats .d.ts as ESM -> export = in ESM -> TS1192 error.

Reproduce

Reproducible against stock tsc with NodeNext resolution.

Suggested Fix

Change export = _default to export default _default to match the exports.import ESM declaration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions