Provide a general summary of the issue here
react-aria, react-stately, and react-aria-components expose a source conditional export such as ./exports/index.ts, but their npm package files exclude exports/**. Bundlers that opt into the source condition resolve an entry that is not present in the installed package.
🤔 Expected Behavior?
An installed npm package should either resolve its advertised source conditional export or fall back to its distributed ESM import entry.
😯 Current Behavior
When Vite is configured with resolve.conditions: ['source'], it selects the missing source entries and fails to start:
Failed to resolve import "react-aria/I18nProvider"
Failed to resolve import "react-aria-components"
💁 Possible Solution
Either remove the source conditional exports from packages whose source files are not published, or include exports/**/*.ts in the npm package files.
🔦 Context
We enable the source condition to consume linked workspace packages directly in a Vite-based Storybook. Because Vite applies the condition to every package, it also selects the React Aria source entries. This affects root and deep imports such as react-aria/I18nProvider.
🖥️ Steps to Reproduce
-
Install react-aria from npm.
-
Add the following Vite configuration:
export default defineConfig({
resolve: {
conditions: ['source'],
},
});
-
Import from react-aria or a deep entry such as react-aria/I18nProvider.
-
Start the Vite development server or run a Vite-based test.
Version
react-aria 3.50.0, react-aria-components 1.19.0, react-stately 3.48.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS 26.5.2
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
Provide a general summary of the issue here
react-aria,react-stately, andreact-aria-componentsexpose asourceconditional export such as./exports/index.ts, but their npm package files excludeexports/**. Bundlers that opt into thesourcecondition resolve an entry that is not present in the installed package.🤔 Expected Behavior?
An installed npm package should either resolve its advertised
sourceconditional export or fall back to its distributed ESMimportentry.😯 Current Behavior
When Vite is configured with
resolve.conditions: ['source'], it selects the missingsourceentries and fails to start:💁 Possible Solution
Either remove the
sourceconditional exports from packages whose source files are not published, or includeexports/**/*.tsin the npm package files.🔦 Context
We enable the
sourcecondition to consume linked workspace packages directly in a Vite-based Storybook. Because Vite applies the condition to every package, it also selects the React Ariasourceentries. This affects root and deep imports such asreact-aria/I18nProvider.🖥️ Steps to Reproduce
Install
react-ariafrom npm.Add the following Vite configuration:
Import from
react-ariaor a deep entry such asreact-aria/I18nProvider.Start the Vite development server or run a Vite-based test.
Version
react-aria3.50.0,react-aria-components1.19.0,react-stately3.48.0What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS 26.5.2
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response