feat(resolve): skip alias to d.ts (#7684)
### Description
Simple port to
https://github.com/vercel/next.js/pull/11322/files#diff-f80cef26fea96d9530aab29fcaa89b2cc296a54a826a367254997d2885727d33R179.
Maybe we can consider to expose this as sort of configuration predicate
for specific filter, but the depth of this call is somewhat deep from
resolve context and so far there is only one cases (excluding d.ts), so
followed same practices to exising next.js behavior.
Closes PACK-2701