Expected behavior:
I create 20 projects with the following gulpfile attached below. It need set the "--max-old-space-size=8192". My question is why it needs so much memory?
When i add this code to gulp-typescript compiler.js in the bottom of "inputDone" function.
inputDone() {
...
this.program = undefined; --- the added
this.project.output.finish(result);
}
Then it is ok, it does not need so much memory.
So, do i have method to release the typescript program in the gulpfile?
Expected behavior: I create 20 projects with the following gulpfile attached below. It need set the "--max-old-space-size=8192". My question is why it needs so much memory?
When i add this code to gulp-typescript compiler.js in the bottom of "inputDone" function. inputDone() { ... this.program = undefined; --- the added
this.project.output.finish(result); }
Then it is ok, it does not need so much memory. So, do i have method to release the typescript program in the gulpfile?
Actual behavior:
Your gulpfile: const packages: IotSdkPackage[] = [ { name: 'common', project: createProject('src/common/tsconfig.json'), }, { name: 'log-serverless', project: createProject('src/log-serverless/tsconfig.json'), }, { name: 'utils', project: createProject('src/utils/tsconfig.json'), }, { name: 'lambda', project: createProject('src/lambda/tsconfig.json'), }, // other projects ];
The tasks: function buildPackage(tsPackage: IotSdkPackage) { let releaseDir = dist; return tsPackage.project .src() .pipe(tsPackage.project()) .pipe(dest(
${releaseDir}/${tsPackage.name}
)); }Include your gulpfile, or only the related task (with
ts.createProject
).tsconfig.json
Include your tsconfig, if related to this issue.
Code
Include your TypeScript code, if necessary.