Skip to content

chore(build): Remove default @rollup/plugin-node-resolve option #4639

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

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Feb 25, 2022

According to the @rollup/plugin-node-resolve docs, the mainFields option tells the plugin what field in package.json to use as an entry point. The default value is ['module', 'main'], and the plugin will use the first element of the array for which it finds a match in package.json.

All of our package.json files have a module entry, which is reflected in the fact that we've had mainFields set to ['module']. But that of course leads to the same outcome as the just using the default would - there's a match on 'module', and so that's what's used. This PR therefore removes the option in favor of using the default. As would be expected, there is no change in the bundle content.

@AbhiPrasad AbhiPrasad added this to the Pre 7.0.0 Work milestone Feb 28, 2022
@lobsterkatie lobsterkatie force-pushed the kmclb-remove-default-node-resolve-rollup-option branch from efcfa98 to a92e77d Compare February 28, 2022 19:00
@lobsterkatie lobsterkatie marked this pull request as ready for review February 28, 2022 19:01
@github-actions
Copy link
Contributor

size-limit report

Path Base Size (32edb0b) Current Size Change
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.77 KB 19.77 KB 0%
@sentry/browser - ES5 CDN Bundle (minified) 63.47 KB 63.47 KB 0%
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.44 KB 18.44 KB +0.01% 🔺
@sentry/browser - ES6 CDN Bundle (minified) 56.6 KB 56.6 KB 0%
@sentry/browser - Webpack (gzipped + minified) 22.2 KB 22.2 KB 0%
@sentry/browser - Webpack (minified) 76.36 KB 76.36 KB 0%
@sentry/react - Webpack (gzipped + minified) 22.23 KB 22.23 KB 0%
@sentry/nextjs Client - Webpack (gzipped + minified) 46.4 KB 46.4 KB 0%
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.23 KB 27.23 KB +0.01% 🔺

@lobsterkatie lobsterkatie merged commit 7525490 into master Feb 28, 2022
@lobsterkatie lobsterkatie deleted the kmclb-remove-default-node-resolve-rollup-option branch February 28, 2022 19:22
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