Skip to content

Usage of require breaks rollup builds for consumers #1207

Closed
@dgreif

Description

@dgreif

The require statement introduced in https://github.com/primer/components/pull/1157/files#diff-5cad94b1fb0ac48b138379a37927067430301335853ae33503a9a64a626fec16R37 can cause issues for consumers if they have Rollup configured for ESM only. Rather than using require, we should use a dynamic import('focus-visible'). This will require a .d.ts file be created for focus-visible since one does not exist yet.

Thanks for pointing out this issue @daaku!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions