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

Mark Vue and React packages as side-effect free #929

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

thecrypticace
Copy link
Contributor

Apparently adding an exports field implicitly marks a package as having side-effects in some cases even when direct imports of a file didn't previously do so.

Rollup and esbuild seem to not care about this when dealing with files directly. But Vite's internal node resolution logic does. I'm guessing Remix might be in a similar situation here. We export pure render functions for both React and Vue so marking our packages with "sideEffects": false should be fine.

Fixes #926

@thecrypticace thecrypticace merged commit 436b957 into master Feb 8, 2023
@thecrypticace thecrypticace deleted the fix/side-effects-exports branch February 8, 2023 20:19
@szechyjs
Copy link

Updating to v2.0.15 breaks our CRA builds with the following error.

Module not found: Error: Resolving to directories is not possible with the exports field (request was ./24/solid/)

@thecrypticace
Copy link
Contributor Author

@szechyjs What does your import statement look like?

@szechyjs
Copy link

@szechyjs What does your import statement look like?

import { BriefcaseIcon, HandRaisedIcon, ClipboardDocumentListIcon, ClockIcon } from '@heroicons/react/24/solid/';

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.

All icons ending up in final bundle
2 participants