rollup / plugins

🍣 The one-stop shop for official Rollup plugins
MIT License
3.57k stars 568 forks source link

chore(repo): fix incorrect import path in virtual plugin #1702

Closed tk-1io closed 4 weeks ago

tk-1io commented 2 months ago

Rollup Plugin Name: virtual

This PR contains:

Are tests included?

Breaking Changes?

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).

tk-1io commented 1 month ago

@shellscape Is there anything I can do to get this pull request merged?

shellscape commented 4 weeks ago

thanks!

Going to change this to a repo chore, since it doesn't affect the package output itself and is more about local dev.