[Feature]: in bundless, if cannot resolve, error message should be emitted
By the way, in bundless mode, if cannot resolve, error message should be emitted
Originally posted by @SoonIter in https://github.com/web-infra-dev/rslib/issues/250#issuecomment-2382455625
if cannot resolve, error message should be emitted
In this case, it's because the resolved module is externalized, Rspack won't check if it's available anymore.
Yes, we need to ensure that the emitted files could be resolved. In this case, we overlooked the index mainFields, which makes this a fixable bug for us. Let's see if there are any paths that Rslib could not detect in the future. If so, we can add a post-check.
getResolve in externals function related.
We can resolve every module when externalized and print a warning if cannot be resolved, but we should benchmark the performance of this.
https://github.com/web-infra-dev/rslib/blob/8a9f9e336a84a0c7359d5e7d5ad06e8699ea33e2/packages/core/src/config.ts#L1016-L1023
@SoonIter should we throw error/warning here if we cannot resolve in bundleless mode?
https://github.com/web-infra-dev/rslib/blob/8a9f9e336a84a0c7359d5e7d5ad06e8699ea33e2/packages/core/src/config.ts#L1016-L1023
@SoonIter should we throw error/warning here if we cannot resolve in bundleless mode?
let the bullet in the sky, users would feedback
https://github.com/web-infra-dev/rslib/blob/6f11138094bb09cec6e056a930a572f2c8608dd1/packages/core/src/config.ts#L1085-L1093 Open a new issue if you want to feedback about this issue.