Plugins: Typescript plugin fails on files referenced outside of working directory

Created on 27 Mar 2020  ·  6Comments  ·  Source: rollup/plugins

  • Rollup Plugin Name: @rollup/plugin-typescript
  • Rollup Plugin Version: 4.0.0
  • Rollup Version: 2.2.0

How Do We Reproduce?

https://repl.it/repls/SilkyDesertedAlphatest

Expected Behavior

I expect Rollup to bundle all the referenced files.

Actual Behavior

Rollup fails to bundle files that require going up from pwd.

As a side note, I don't have this issue with @rollup/plugin-sucrase or using webpack+ts-loader.
In @rollup/plugin-sucrase's case, I can't use it in my project because I'm experiencing of https://github.com/rollup/plugins/issues/239

t³ ✨ enhancement t¹ 🐞 bug x⁷ ⋅ stale 🔌 plugin-typescript

Most helpful comment

This is still very much an issue.

All 6 comments

I have been digging through the plugin code and I think what it needs is for the user to be able to pass in a custom resolver to pluginutils.createFilter(include, exclude, options); currently getPluginOptions only passes through include and exclude but what it needs to do is also pass through options so can configure the resolutionBase in pluginutils.createFilter because it currently defaults to using the current directory if nothing is passed to it.

Tagged this both bug and enhancement because it kind of has one foot in each.

Ugh, I just spent over an hour finding this out the hard way.
For my case this requires me to restructure my multi-package project in a weird way.
Definitely a bug.

Hey folks. This is a call for contribution and help in resolving this TypeScript plugin issue. We're working with limited resources and the folks who can help have limited time. If you can help by triaging and submitting a Pull Request, we'd be happy to review it.

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

This is still very much an issue.

Was this page helpful?
0 / 5 - 0 ratings