Skip to content

feat(package): dual module support #11933

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kmcfaul
Copy link
Contributor

@kmcfaul kmcfaul commented Jul 23, 2025

What: Closes #11686
Assisted-by: Cursor

First pass on dual module package.json.

react-icons, react-tokens, and react-styles are not currently included because of what we output to the dist & what our docs expects when consuming our repos. Need to investigate further to see if we can adjust without breaking.

@patternfly-build
Copy link
Contributor

patternfly-build commented Jul 23, 2025

@@ -19,7 +19,7 @@ import { draggable } from './utils/decorators/draggable';
import { treeRow } from './utils';
import { mergeProps } from './base/merge-props';
import { IVisibility } from './utils/decorators/classNames';
import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip/Tooltip';
Copy link
Contributor Author

@kmcfaul kmcfaul Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is worth pointing out and thinking about - with the new export format, it appears that directory level imports and file level imports cannot exist simultaneously and be resolved successfully (component wildcard patterns end up interfering with each other).

Currently, only directory imports are supported so file imports like the above Tooltip won't work and would need to be updated. There are several of these type of imports reported in our analytics. Still investigating if that can be updated to support both.

import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
import imgAvatar from '@patternfly/react-core/src/components/assets/avatarImg.svg';
// import imgAvatar from '../components/assets/avatarImg.svg';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at inlining this.

Copy link
Contributor

@jamestalton jamestalton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - Package Publishing - Published Libraries should follow NPM dual module package standards
3 participants