Skip to content

Commit

Permalink
feat(index): add 'extraCacheKeys' option
Browse files Browse the repository at this point in the history
  • Loading branch information
oscard0m committed Sep 18, 2022
1 parent ee5e649 commit a196d87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Expand Up @@ -86,7 +86,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
{
check: true,
verbosity: VerbosityLevel.Warning,
clean: true,
clean: !options?.extraCacheKeys && (options?.sourceMapCallback || options?.transformers),
cacheRoot: findCacheDir({ name: "rollup-plugin-typescript2" }),
include: ["*.ts+(|x)", "**/*.ts+(|x)"],
exclude: ["*.d.ts", "**/*.d.ts"],
Expand All @@ -99,6 +99,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
tsconfigDefaults: {},
objectHashIgnoreUnknownHack: false,
cwd: process.cwd(),
extraCacheKeys: []
}, options as IOptions);

if (!pluginOptions.typescript) {
Expand Down
1 change: 1 addition & 0 deletions src/ioptions.ts
Expand Up @@ -30,4 +30,5 @@ export interface IOptions
tsconfigDefaults: any;
sourceMapCallback: (id: string, map: string) => void;
objectHashIgnoreUnknownHack: boolean;
extraCacheKeys: string[]
}

0 comments on commit a196d87

Please sign in to comment.