Skip to content

Commit 256eb96

Browse files
authored
Merge pull request #42 from pranava/master
Pass parent enviornment vars to forked processes
2 parents 46fe421 + 2d73068 commit 256eb96

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

lib/index.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,17 @@ ForkTsCheckerWebpackPlugin.prototype.spawnService = function () {
242242
[],
243243
{
244244
execArgv: this.workersNumber > 1 ? [] : ['--max-old-space-size=' + this.memoryLimit],
245-
env: {
246-
TSCONFIG: this.tsconfigPath,
247-
TSLINT: this.tslintPath || '',
248-
WATCH: this.isWatching ? this.watchPaths.join('|') : '',
249-
WORK_DIVISION: Math.max(1, this.workersNumber),
250-
MEMORY_LIMIT: this.memoryLimit
251-
},
245+
env: Object.assign(
246+
{},
247+
process.env,
248+
{
249+
TSCONFIG: this.tsconfigPath,
250+
TSLINT: this.tslintPath || '',
251+
WATCH: this.isWatching ? this.watchPaths.join('|') : '',
252+
WORK_DIVISION: Math.max(1, this.workersNumber),
253+
MEMORY_LIMIT: this.memoryLimit
254+
}
255+
),
252256
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
253257
}
254258
);

0 commit comments

Comments
 (0)