Skip to content

feat: error when failed to resolve aliased import#14973

Merged
patak-cat merged 2 commits intomainfrom
error-alias-fail
Nov 13, 2023
Merged

feat: error when failed to resolve aliased import#14973
patak-cat merged 2 commits intomainfrom
error-alias-fail

Conversation

@bluwy
Copy link
Member

@bluwy bluwy commented Nov 13, 2023

Description

fix #5813

Add a customResolver to @rollup/plugin-alias to add additional metadata to signal importAnalysis to error if the aliased import failed to resolve.

This shouldn't be breaking as the previous behaviour would've always result in a broken dev experience.

Additional context

Tested manually by editing

import { msg as regexMsg } from 'regex/test'
to something non-existent.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines, especially the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Nov 13, 2023
@patak-cat patak-cat merged commit 6a564fa into main Nov 13, 2023
@patak-cat patak-cat deleted the error-alias-fail branch November 13, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2-nice-to-have Not breaking anything but nice to have (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No error handling on faulty mapped imports

2 participants