Skip to content

Bug - [All] - [react core esm packages should explicitely import the .mjs files from react-styles] #8871

@KKoukiou

Description

@KKoukiou

Describe the problem
In cockpit we are importing files like import "@patternfly/react-core/dist/esm/components/Button/index.js";

I was recently analyzing the bundled output and noticed that the files that are imported from react-styles are not the .mjs ones but the plain CommonJS. This results in the use of 'require' instead of 'import'.

Screenshot from 2023-03-27 23-44-34

Expected behavior
I expect that the esm/ directory imports directly from the .mjs files from react-styles.

Is this issue blocking you?
No

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions