Skip to content

Memory leak in typescript plugin (4.0.0+) #322

Description

@Tronil
  • Rollup Plugin Name: typescript
  • Rollup Plugin Version: 4.1.1
  • Rollup Version: 2.6.1
  • Operating System (or Browser): Linux
  • Node Version: 12.16.2

How Do We Reproduce?

Clone https://github.com/Tronil/rollup-ts-mem-leak
Run:
npm install
npm run watch
Repeatedly trigger watch build by saving src/index.ts

Expected Behavior

Memory usage should not grow until rollup crashes with out-of-memory.

Actual Behavior

Memory usage grows with about 25MB for every triggered build, eventually running out of memory and crashing.

Note that this repo only contains a "hello world" file - for real projects this memory leak is massive. In our project the leak was around 300 MB for every build, making the process crash after 6 or 7 builds. The 3.x versions do not appear to have this issue, so it is likely related to the 4.0 rewrite.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions