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

fix: add default exports to lwc @W-13710298 #3997

Merged
merged 11 commits into from
Feb 16, 2024
Merged

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Feb 14, 2024

Details

Some of our packages have default exports, but export * from 'some-package' does not include the default export. In order to use a default export from an lwc re-export, the default export must be handled explicitly.

import LwcRollupPlugin from '@lwc/rollup-plugin' // has always worked
import LwcRollupPlugin from 'lwc/rollup-plugin' // didn't work, now it does

Does this pull request introduce a breaking change?

  • ✅ No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • ⚠️ Yes, it does include an observable change.

GUS work item

W-13710298

@wjhsf wjhsf requested a review from a team as a code owner February 14, 2024 21:41
packages/lwc/jest.config.cjs Outdated Show resolved Hide resolved
Copy link
Collaborator

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

Couple nits, but LGTM!

packages/lwc/__tests__/default-exports.spec.ts Outdated Show resolved Hide resolved
packages/lwc/jest.config.cjs Outdated Show resolved Hide resolved
@nolanlawson
Copy link
Collaborator

⚠️ Yes, it does include an observable change.

To be clear, this is only an observable change for npm package consumers, and only because new functionality is now exposed. So extremely low risk.

@nolanlawson
Copy link
Collaborator

ReferenceError: Node is not defined

Looks like you will have to pull in "dom" in the tsconfig.

@wjhsf wjhsf force-pushed the wjh/lwc-export-default branch from b4955c6 to 6ecc7d2 Compare February 16, 2024 19:55
@wjhsf wjhsf merged commit a579fcc into master Feb 16, 2024
9 checks passed
@wjhsf wjhsf deleted the wjh/lwc-export-default branch February 16, 2024 21:56
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.

3 participants