-
Notifications
You must be signed in to change notification settings - Fork 413
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
Conversation
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); | ||
}); |
There was a problem hiding this comment.
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.
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: [], | ||
}, | ||
}); |
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
/nucleus test |
Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
/nucleus test |
/nucleus ignore --reason "webruntime failing due to unrelated usage of __lwc variable" |
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?
Does this pull request introduce an observable change?
GUS work item