Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1d57680b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ): NormalizedPluginOptions { | ||
| d(options, 'exclude', /node_modules/i); | ||
| d(options, 'include', /\.([cm]js|[jt]sx?|flow)$/i); | ||
| d(options, 'include', /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/); |
There was a problem hiding this comment.
Restore case-insensitive default include regex
The new default include pattern is now case-sensitive, so files like Component.TSX or App.JS no longer match and won’t get builtin:react-refresh-loader applied. This is a regression from the previous /.../i behavior and can silently disable Fast Refresh in projects that use uppercase or mixed-case extensions (common on case-insensitive filesystems or legacy repos).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Updates the plugin’s default include pattern used to decide which files get processed by the built-in React Refresh loader, aligning it with modern JS/TS extension variants.
Changes:
- Updated the documented default
includeregex inPluginOptionsto enumerate JS/TS extensions explicitly. - Updated
normalizeOptions()to use the new defaultincluderegex. - Updated README option documentation to match the new default.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/options.ts | Changes the default include matcher used at runtime and in the TypeScript docs. |
| README.md | Updates the documented include default regex shown to users. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updates the default file matching pattern for the React Refresh loader to better align with modern JavaScript and TypeScript file extensions.