Closed thecrypticace closed 1 year ago
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/)
@szechyjs What does your import statement look like?
@szechyjs What does your import statement look like?
import { BriefcaseIcon, HandRaisedIcon, ClipboardDocumentListIcon, ClockIcon } from '@heroicons/react/24/solid/';
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