Alias do not be checked in `rollup.external`.
s3xysteak opened this issue · comments
Environment
Node.js: v20.10.0
pnpm: v8.15.6
Reproduction
https://github.com/s3xysteak/unbuild-alias-error
pnpm i
pnpm build
It will throw a error and stop building.
Change code in src/index.ts
:
// export * from '@/two'
export * from './two'
Run pnpm build
, it can build correctly.
Describe the bug
Refer to code:
Line 299 in 4c5c0cc
Alias was not be respected in external check. So if using a alias instead of relative path, it will not enter this if statement.
The problem can be fixed by inlineDependencies
option, but that may not be the user's intention. Refer to #376.
Additional context
No response
Logs
No response