Clear and concise description of the problem
Currently, the plugin's default include rule uses the regular expression /\.[tj]sx?$/. This strictly matches files ending with .js, .jsx, .ts, or .tsx.
However, in modern build tools and frameworks, it's very common for file imports to be appended with query parameters under the hood. A notable example is TanStack Router, which appends query parameters like ?tsr-split=component to file paths for its code-splitting feature (see related issue: TanStack/router#5653).
Because of the strict $ at the end of the current regex, these files with query parameters fail to match the default include rule, causing the plugin to skip them unless users manually override the configuration.
Suggested solution
I propose updating the default include regular expression to gracefully handle optional query parameters.
Changing it from:
To:
Alternative
No response
Additional context
No response
Validations
Clear and concise description of the problem
Currently, the plugin's default
includerule uses the regular expression/\.[tj]sx?$/. This strictly matches files ending with.js,.jsx,.ts, or.tsx.However, in modern build tools and frameworks, it's very common for file imports to be appended with query parameters under the hood. A notable example is TanStack Router, which appends query parameters like
?tsr-split=componentto file paths for its code-splitting feature (see related issue: TanStack/router#5653).Because of the strict
$at the end of the current regex, these files with query parameters fail to match the defaultincluderule, causing the plugin to skip them unless users manually override the configuration.Suggested solution
I propose updating the default
includeregular expression to gracefully handle optional query parameters.Changing it from:
/\.[tj]sx?$/To:
/\.[tj]sx?(?:\?.*)?$/Alternative
No response
Additional context
No response
Validations