Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Switch to ESM module #2281

Merged
merged 4 commits into from
Sep 12, 2023
Merged

Switch to ESM module #2281

merged 4 commits into from
Sep 12, 2023

Conversation

Pessimistress
Copy link
Collaborator

For #2272
Targeting v7.2

test/src/components/map.spec.jsx Show resolved Hide resolved
@@ -0,0 +1,5 @@
import * as React from 'react';

export function createPortal(element, container) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hoping to learn what this does. Where is this used now? I only see the usage getting deleted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file is used as an alias for react-dom during node tests, configured in ocularrc. Before we were hijacking the function with require('react-dom').createPortal = createPortalMock, but that no longer works in the ESM (import/export) world.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, ok got it. Could you comment that it's aliased in ocularrc?

@Pessimistress Pessimistress merged commit ed70d8e into master Sep 12, 2023
1 check passed
@Pessimistress Pessimistress deleted the x/esm branch September 12, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants