Technically, this fixes a tiny new regression whereby a user could have accidentally (or incorrectly) made rpt2 try to process a directly imported declaration
Details
rpt2 should always ignore declarations
regardless of the exclude; as in, if a user accidentally removes declarations in an override, rpt2 should still not directly read declarations
as they are normally read ambiently by TS and not directly by Rollup or TS
this also ensures that the resolveId check is the same as the type-only resolve pre-check
adds a comment referencing why this is done. see my commit message step-by-step details on that one, it's a bit complicated logic
Cherry-pick of twocommits from October that I had on a different, incomplete branch for #426
Summary
Follow-up to https://github.com/ezolenko/rollup-plugin-typescript2/pull/451#discussion_r1256333929, ensure declarations are always ignored during resolution.
Details
rpt2 should always ignore declarations
exclude
; as in, if a user accidentally removes declarations in an override, rpt2 should still not directly read declarationsthis also ensures that the
resolveId
check is the same as the type-only resolve pre-checkCherry-pick of two commits from October that I had on a different, incomplete branch for #426