Vendor entry points are hardcoded per package/version/subpath in VENDOR_IMPORTS and STYLED_COMPONENTS_IMPORTS — packages/@sanity/cli-build/src/actions/build/buildVendorDependencies.ts (e.g. react ./jsx-runtime, react-dom ./client / ./server).
Problem: when react/react-dom add a new subpath to their package.json exports, userland can't deploy an auto-updating studio importing it until we manually add it here and cut a release.
Goal: resolve the entry-point set automatically from each package's package.json exports, applying the conditions a browser bundler would (browser/import/default), replacing the manual table.
styled-components is the tricky case: it does not (yet) use exports conditions — it uses the webpack-style top-level browser field that remaps main. Needs a special case (and may move to exports later).
Follow-up from #1150.
Vendor entry points are hardcoded per package/version/subpath in
VENDOR_IMPORTSandSTYLED_COMPONENTS_IMPORTS—packages/@sanity/cli-build/src/actions/build/buildVendorDependencies.ts(e.g. react./jsx-runtime, react-dom./client/./server).Problem: when
react/react-domadd a new subpath to theirpackage.jsonexports, userland can't deploy an auto-updating studio importing it until we manually add it here and cut a release.Goal: resolve the entry-point set automatically from each package's
package.jsonexports, applying the conditions a browser bundler would (browser/import/default), replacing the manual table.styled-componentsis the tricky case: it does not (yet) useexportsconditions — it uses the webpack-style top-levelbrowserfield that remapsmain. Needs a special case (and may move toexportslater).Follow-up from #1150.