RNW-Vite: Add tsconfig path aliases support #29953
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes N/A
What I did
New Expo projects use tsconfig path aliases by default, so support it out of the box.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Run the expo sandbox and create a story for a component that uses tsconfig path imports, e.g.
import Component from '@/components/Component'
.🦋 Canary release
This pull request has been released as version
0.0.0-pr-29953-sha-bbfabab3
. Try it out in a new sandbox by runningnpx [email protected] sandbox
or in an existing project withnpx [email protected] upgrade
.More information
0.0.0-pr-29953-sha-bbfabab3
shilman/rnw-add-typescript-paths
bbfabab3
1733671523
)To request a new release of this pull request, mention the
@storybookjs/core
team.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=29953
Greptile Summary
Adds TypeScript path alias support for React Native Web Vite projects, enabling default path aliases in new Expo projects through the integration of vite-tsconfig-paths plugin.
vite-tsconfig-paths
dependency (^5.1.4) incode/frameworks/react-native-web-vite/package.json
tsconfigPaths()
plugin incode/frameworks/react-native-web-vite/src/vite-plugin.ts
andpreset.ts