-
Notifications
You must be signed in to change notification settings - Fork 72
Recommendation for multi-module setup? Memory leak with 18+ Rollup watchers #177
Copy link
Copy link
Closed
Labels
help wantedkind: optimizationPerformance, space, size, etc improvementPerformance, space, size, etc improvementpriority: backlogLow priorityLow prioritypriority: in progressproblem: staleIssue has not been responded to in some timeIssue has not been responded to in some timescope: upstreamIssue in upstream dependencyIssue in upstream dependencyscope: watch modeRelated to Rollup's watch modeRelated to Rollup's watch modesolution: workaround availableThere is a workaround available for this issueThere is a workaround available for this issue
Description
Metadata
Metadata
Assignees
Labels
help wantedkind: optimizationPerformance, space, size, etc improvementPerformance, space, size, etc improvementpriority: backlogLow priorityLow prioritypriority: in progressproblem: staleIssue has not been responded to in some timeIssue has not been responded to in some timescope: upstreamIssue in upstream dependencyIssue in upstream dependencyscope: watch modeRelated to Rollup's watch modeRelated to Rollup's watch modesolution: workaround availableThere is a workaround available for this issueThere is a workaround available for this issue
I have a project with a bunch (18) separate (TS) modules, each of which is compiled down to its own
.jsfile with rollup and this plugin. I'd like to set up a single rollup process to watch and recompile the lot of them, which I'm currently doing with a rollup config file that instantiates this plugin 18 times, each time with a differentincludesetting, because otherwise the plugin will emit.d.tsfiles for all the files in each project'sdistdirectory.This regularly (but only after a bunch of recompile cycles) leads to node running out of memory:
I guess that has something to do with the TypeScript compiler building up its type/code graphs multiple times, once for every instance of the plugin. Is that correct?
Is there a way to set up the plugin once, but use it to build several projects, each of which emits
.d.tsfiles only for its own files?Or is there maybe some other recommended way to approach a use case like this?