Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements an ignoredRouteFiles feature that allows developers to exclude specific files from being treated as routes during the route discovery process. The feature supports glob patterns starting with **/* and is configured through the router.ignoredRouteFiles option in the Vite configuration.
- Adds
ignoredRouteFilesconfiguration option to exclude files from route generation - Implements support for both Vite and Metro bundlers with appropriate glob pattern handling
- Includes comprehensive test coverage for web and iOS platforms
Reviewed Changes
Copilot reviewed 15 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/one/src/vite/types.ts | Adds TypeScript type definition for ignoredRouteFiles configuration option |
| packages/one/src/vite/plugins/virtualEntryPlugin.ts | Updates virtual entry generation to handle ignored route files in glob patterns |
| packages/one/src/metro-config/getViteMetroPluginOptions.ts | Implements Metro bundler support for ignored route files using regex patterns |
| packages/one/src/babel-plugins/one-router-metro.ts | Adds Babel plugin support for Metro's require context regex |
| packages/one/metro-entry-ctx.js | Updates Metro entry context to use dynamic regex for file filtering |
| tests/test/vite.config.ts | Configures test setup with ignored route files pattern |
| tests/test/tests/router/ignoredRouteFiles/*.ts | Adds comprehensive test coverage for both web and iOS platforms |
| tests/test/app/router/ignoredRouteFiles/*.tsx | Creates test route files to validate ignore functionality |
| packages/test/src/utils/appium.ts | Improves error handling in test utilities |
Comments suppressed due to low confidence (1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements an
ignoredRouteFilesoption that allows developers to exclude specific files from being treated as routes during the route discovery process.Currently, this feature supports glob patterns starting with
**/*due to Metro bundler limitations (as we need to convert it to RegExp forrequire.contextused by Metro).ignoredRouteFilesconfiguration option to exclude files from route generationReferences
ignoredRouteFileshttps://remix.run/docs/en/main/file-conventions/vite-config#ignoredroutefilesignoredRouteFileshttps://reactrouter.com/how-to/file-route-conventions?utm_source=chatgpt.com