[turbopack] replace regex with indexof (#92023)
Replace regex-based `isJs`/`isCss` checks with string operations (`indexOf` + `startsWith`) to avoid regex overhead on a hot path. Extracts a shared `endsWithExtension` helper that finds the end of the path portion (before `?` or `#`) and checks the extension without allocating substrings.
Showing
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
Please
register
or
sign in
to comment