File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
8686 {
8787 check : true ,
8888 verbosity : VerbosityLevel . Warning ,
89- clean : true ,
89+ clean : ! options ?. extraCacheKeys && ( options ?. sourceMapCallback || options ?. transformers ) ,
9090 cacheRoot : findCacheDir ( { name : "rollup-plugin-typescript2" } ) ,
9191 include : [ "*.ts+(|x)" , "**/*.ts+(|x)" ] ,
9292 exclude : [ "*.d.ts" , "**/*.d.ts" ] ,
@@ -99,6 +99,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
9999 tsconfigDefaults : { } ,
100100 objectHashIgnoreUnknownHack : false ,
101101 cwd : process . cwd ( ) ,
102+ extraCacheKeys : [ ]
102103 } , options as IOptions ) ;
103104
104105 if ( ! pluginOptions . typescript ) {
Original file line number Diff line number Diff line change @@ -30,4 +30,5 @@ export interface IOptions
3030 tsconfigDefaults : any ;
3131 sourceMapCallback : ( id : string , map : string ) => void ;
3232 objectHashIgnoreUnknownHack : boolean ;
33+ extraCacheKeys : string [ ]
3334}
You can’t perform that action at this time.
0 commit comments