import * as cp from 'child_process' ; import * as path from 'path' ; import * as process from 'process' ; export function gulp_webpack ( mode ) { const env = process . env ; env . NODE_OPTIONS = '--max-old-space-size=8192' ; return cp . spawn ( path . join ( '.' , 'node_modules' , '.bin' , process . platform === 'win32' ? 'webpack.cmd' : 'webpack' ) , [ '--mode' , mode , '--stats' , 'minimal' ] , { stdio : 'inherit' , env } ) ; }