-
Notifications
You must be signed in to change notification settings - Fork 71
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: don't attempt to change declarationMap sources
when no output
#334
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agilgur5
added
kind: bug
Something isn't working properly
kind: regression
Specific type of bug -- past behavior that worked is now broken
and removed
kind: bug
Something isn't working properly
labels
May 31, 2022
- when using rpt2 as a configPlugin, there is no Rollup `output`, so it will be `undefined` - when `declarationMap: true` in `tsconfig`, this block of code is called as a workaround due to the placeholder dir we must use for output -- but, in this case, it errors out, since the `declarationDir` is `undefined` - `path.relative` needs a `string` as a arg, not `undefined` - so skip this transformation entirely when there's no `output`, as it doesn't need to be done in that case anyway - this transformation code happens to have been written by me 2 years ago too, so I had fixed one bug with that but created a different bug 😅 (fortunately one that only I have stumbled upon)
agilgur5
force-pushed
the
fix-configplugin-usage
branch
from
June 1, 2022 17:58
8448f32
to
3a9c951
Compare
1 task
agilgur5
added
the
scope: configPlugin
Related to usage as a configPlugin for reading rollup.config.ts (vs. regular plugin)
label
Sep 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind: regression
Specific type of bug -- past behavior that worked is now broken
scope: configPlugin
Related to usage as a configPlugin for reading rollup.config.ts (vs. regular plugin)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Skip transforming declarationMap
sources
when there is no output, i.e. in the case of using rpt2 as aconfigPlugin
configPlugin
with"declarationMap": true
#310Details
configPlugin
, there is no Rollupoutput
, so it will beundefined
declarationMap: true
intsconfig
, this block of code is called as a workaround due to theplaceholder
dir we must use for output -- but, in this case, it errors out, since thedeclarationDir
isundefined
path.relative
needs astring
as a arg, notundefined
output
, as it doesn't need to be done in that case anyway