You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently tsdx outputs to ./.rts2_cache_* and requires you to have a gitignore for these directories.
Desired Behavior
Use rollup-plugin-typescript2's default, which is node_modules/.cache/rollup-plugin-typescript2. This way there's no need to gitignore anything extra (as node_modules is usually gitignored already) and it doesn't clutter up the app root with more gitignored directories. babel-loader has a similar default directory in node_modules/.cache/babel-loader, but it doesn't let you change the directory.
Suggested Solution
Remove the cacheRoot configuration of rollup-plugin-typescript2 on
. Alternatively, use node_modules/.cache/rollup-plugin-typescript2_${opts.format} so it retains the cache suffix, but isn't located externally.
This would also mean the default gitignores no longer need these directories.
EDIT: see #329 for an implementation of this suggested solution.
Who does this impact? Who is this for?
All users, but it shifts the cache into entirely internal.
Describe alternatives you've considered
Added an alternative in suggested solutions.
Additional context
See rollup-plugin-typescript2 and babel-loader links above.
I'm not sure what the original rationale / explanation for having the cache be outside of node_modules/.cache/ and different from the default cacheRoot was. I couldn't find any rationale in any comments, issues, PRs, or in the commit description of the commit that added this config, so I don't know what the reasoning behind that was. It also didn't seem like that option was carried over in #208 (it doesn't seem like rollup-plugin-ts has that option though), but it was brought back in the rollback #287.
I think it would be useful to at least elaborate on that here as that was a somewhat consequential decision.
The text was updated successfully, but these errors were encountered:
agilgur5
changed the title
Why not use default cache directory (node_modules/.cache/rollup-plugin-typescript2)?
Why not use the default cache directory (node_modules/.cache/rollup-plugin-typescript2)?
Nov 14, 2019
Current Behavior
Currently
tsdx
outputs to./.rts2_cache_*
and requires you to have agitignore
for these directories.Desired Behavior
Use
rollup-plugin-typescript2
's default, which isnode_modules/.cache/rollup-plugin-typescript2
. This way there's no need to gitignore anything extra (asnode_modules
is usually gitignored already) and it doesn't clutter up the app root with more gitignored directories.babel-loader
has a similar default directory innode_modules/.cache/babel-loader
, but it doesn't let you change the directory.Suggested Solution
Remove the
cacheRoot
configuration ofrollup-plugin-typescript2
ontsdx/src/createRollupConfig.ts
Line 131 in 6252b70
node_modules/.cache/rollup-plugin-typescript2_${opts.format}
so it retains the cache suffix, but isn't located externally.This would also mean the default gitignores no longer need these directories.
EDIT: see #329 for an implementation of this suggested solution.
Who does this impact? Who is this for?
All users, but it shifts the cache into entirely internal.
Describe alternatives you've considered
Added an alternative in suggested solutions.
Additional context
See
rollup-plugin-typescript2
andbabel-loader
links above.I'm not sure what the original rationale / explanation for having the cache be outside of
node_modules/.cache/
and different from the defaultcacheRoot
was. I couldn't find any rationale in any comments, issues, PRs, or in the commit description of the commit that added this config, so I don't know what the reasoning behind that was. It also didn't seem like that option was carried over in #208 (it doesn't seem likerollup-plugin-ts
has that option though), but it was brought back in the rollback #287.I think it would be useful to at least elaborate on that here as that was a somewhat consequential decision.
The text was updated successfully, but these errors were encountered: