Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(virtual): incorrect import path #1702

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tk-1io
Copy link
Contributor

@tk-1io tk-1io commented Apr 12, 2024

Rollup Plugin Name: virtual

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (covered by existing tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Might fix builds for PR #1578, so it probably could be accepted too then

Description

The "virtual" plugin package currently imports its own types from ../, even though its types are actually placed inside ../types. Every other plugin appears to correctly import from ../types too (see e.g. alias, auto-install, ...).
I stumbled across this while attempting to build the code of PR #1578 (which i need a fix for too) on my local machine, which errored due to the incorrect import. I noticed the current state is building solely because the virtual plugin lists its type definitions file in its package.json via the types property, which miraculously lets tsc accept the faulty import (even though it shouldn't, in my opinion). My guess is it just works somehow because ../ points to the folder where the package.json lives in, which then references the types file 🤷‍♂️. Now, because in the PR #1578 the types property is gone, we get an error there.
I previously opened a PR to fix the branch of the original PR, but @Geylnu did not respond yet. So why did i open this PR then? Because i think this import path is incorrect and should be fixed anyway, no matter if the other PR will at some point be accepted (or maybe never might be).

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.

None yet

1 participant