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: don't crash when module doesn't map to an input #76

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

Twipped
Copy link
Contributor

@Twipped Twipped commented Feb 19, 2021

In our build we're using a manualChunks function to split off modules into distinct chunks by purpose. This resulted in a crash in this plugin because those chunks do not receive entries in the config, and thus base came out as undefined, which path.resolve rejects.

This change causes the plugin to use the bundle filename if no input name exists, preventing a crash and correcting the output.

@tivac tivac changed the title Address crashes when the module does not map to an input. fix: don't crash when module doesn't map to an input Feb 26, 2021
@tivac tivac merged commit 881eada into tivac:main Feb 26, 2021
@tivac
Copy link
Owner

tivac commented Feb 26, 2021

Thanks @Twipped!

@tivac
Copy link
Owner

tivac commented Feb 26, 2021

Fix published in rollup-plugin-sizes@v1.0.4

@github-actions github-actions bot mentioned this pull request Dec 29, 2022
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.

None yet

2 participants