MCPcopy Index your code
hub / github.com/adobe/react-spectrum / enforceExports

Function enforceExports

yarn.config.cjs:242–261  ·  view source on GitHub ↗

@param {Context} context

({Yarn})

Source from the content-addressed store, hash-verified

240
241/** @param {Context} context */
242function enforceExports({Yarn}) {
243 // make sure build fields are correctly set
244 for (const workspace of Yarn.workspaces()) {
245 let name = workspace.ident;
246 if (isPublishing(workspace) && workspace.manifest.rsp?.type !== 'cli') {
247 // better to do in enforceCSS? it doesn't match the set of packages handled
248 if (name !== 'react-aria-components') {
249 if (
250 name.includes('@react-spectrum') ||
251 name.includes('@adobe/react-spectrum') ||
252 name.includes('@react-aria/visually-hidden')
253 ) {
254 workspace.set('sideEffects', ['*.css']);
255 } else {
256 workspace.set('sideEffects', false);
257 }
258 }
259 }
260 }
261}
262
263function enforceDevMirroringPeerDependencies({Yarn}) {
264 for (const workspace of Yarn.workspaces()) {

Callers 1

yarn.config.cjsFile · 0.85

Calls 2

isPublishingFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected