Skip to content

fix(rollup-plugin): add default modules back #5234

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

Merged
merged 5 commits into from
Feb 26, 2025

Conversation

cardoso
Copy link
Contributor

@cardoso cardoso commented Feb 25, 2025

Details

It reintroduces the default modules removed in #5203 , but in a way that can be opted out.

Fixes #5232
Fixes #5229

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

Comment on lines 43 to 46
it('should be capable to resolve all the base LWC module imports', async () => {
const { warnings } = await runRollup('lwc-modules/lwc-modules.js');
const { warnings } = await runRollup('lwc-modules/lwc-modules.js', { external: [] });
expect(warnings).toHaveLength(0);
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test wasn't doing its job because the base modules were configured as external, which means rollup wouldn't emit warnings that would've pointed to the regression.

Comment on lines 48 to 55
it('should be capable of resolving all the base LWC modules using a custom resolver', async () => {
const { warnings } = await runRollup('lwc-modules/lwc-modules.js', {
external: [],
plugins: [nodeResolve()],
options: {
defaultModules: [],
},
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also added a test for the new defaultModules option.

Copy link
Collaborator

@wjhsf wjhsf left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix and tests!

@wjhsf
Copy link
Collaborator

wjhsf commented Feb 26, 2025

/nucleus test

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
@wjhsf
Copy link
Collaborator

wjhsf commented Feb 26, 2025

/nucleus test

@wjhsf
Copy link
Collaborator

wjhsf commented Feb 26, 2025

/nucleus ignore --reason "webruntime failing due to unrelated usage of __lwc variable"

@wjhsf wjhsf merged commit e4aaacc into salesforce:master Feb 26, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWC Playground - Unresolved dependencies lwc LWC v8.13.3 introduces a regression
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy