Using bundlers that support ES Modules (such as vite) require ES Module exports. Currently, all of the component .js files under @patternfly/react-styles/css/components use require on .css files. It would be better to include in addition to this another file that uses import instead.
A nice to have in addition to this es module file would be placing the @patternfly/react-styles/css directory under both @patternfly/react-styles/dist/esm and @patternfly/react-styles/dist/js . This would allow for bundlers to easily determine which .js files to use for ES modules and commonjs modules.
Using bundlers that support ES Modules (such as vite) require ES Module exports. Currently, all of the component .js files under @patternfly/react-styles/css/components use
requireon .css files. It would be better to include in addition to this another file that usesimportinstead.A nice to have in addition to this es module file would be placing the
@patternfly/react-styles/cssdirectory under both@patternfly/react-styles/dist/esmand@patternfly/react-styles/dist/js. This would allow for bundlers to easily determine which .js files to use for ES modules and commonjs modules.