Skip to content

fix: error on missing file import#83

Merged
sxzz merged 1 commit intosxzz:mainfrom
privatenumber:error-missing-file
Aug 13, 2025
Merged

fix: error on missing file import#83
sxzz merged 1 commit intosxzz:mainfrom
privatenumber:error-missing-file

Conversation

@privatenumber
Copy link
Contributor

Description

Previously, when a file import couldn't be resolved (e.g. import './file'), it would automatically get externalized.

Now it errors.

Linked Issues

Additional context

@privatenumber privatenumber changed the title fix: error on missing file fix: error on missing file import Aug 13, 2025
if (isRelativeOrAbsolute) {
return this.error(`Cannot resolve import '${id}' from '${importer}'`)
}
return external
Copy link
Contributor Author

@privatenumber privatenumber Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think automatically externalizing unresolvable bare specifiers/packages make sense, but there should be a warning if it was not explicitly configured to be externalized.

Maybe this behavior should be configurable.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 13, 2025

Open in StackBlitz

npm i https://pkg.pr.new/rolldown-plugin-dts@83

commit: 7e7e8b8

@sxzz sxzz merged commit 320f20f into sxzz:main Aug 13, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants