diff --git a/src/index.ts b/src/index.ts index 58381c1d..76ff81e0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,7 +35,6 @@ const typescript: PluginImpl = (options) => let service: tsTypes.LanguageService; let noErrors = true; const declarations: { [name: string]: { type: tsTypes.OutputFile; map?: tsTypes.OutputFile } } = {}; - const allImportedFiles = new Set(); let _cache: TsCache; const cache = (): TsCache => @@ -103,8 +102,6 @@ const typescript: PluginImpl = (options) => if (generateRound === 0) { - parsedConfig.fileNames.map(allImportedFiles.add, allImportedFiles); - context.info(`typescript version: ${tsModule.version}`); context.info(`tslib version: ${tslibVersion}`); if (this.meta) @@ -156,10 +153,6 @@ const typescript: PluginImpl = (options) => importer = normalize(importer); - // avoiding trying to resolve ids for things imported from files unrelated to this plugin - if (!allImportedFiles.has(importer)) - return; - // TODO: use module resolution cache const result = tsModule.nodeModuleNameResolver(importee, importer, parsedConfig.options, tsModule.sys); let resolved = result.resolvedModule?.resolvedFileName; @@ -197,8 +190,6 @@ const typescript: PluginImpl = (options) => if (!filter(id)) return undefined; - allImportedFiles.add(normalize(id)); - const contextWrapper = new RollupContext(pluginOptions.verbosity, pluginOptions.abortOnError, this, "rpt2: "); const snapshot = servicesHost.setSnapshot(id, code); @@ -229,9 +220,6 @@ const typescript: PluginImpl = (options) => if (!result) return undefined; - if (result.references) - result.references.map(normalize).map(allImportedFiles.add, allImportedFiles); - if (watchMode && this.addWatchFile && result.references) { if (tsConfigPath)