serverCompiler.watch({},(err,status)=>{ if(err) throw err; status = status.toJson(); status.errors.forEach( err=>console.error(err) ); status.warnings.forEach( warn=>console.warn(warn)); const bundlePath = path.join( serverConfig.output.path, serverConfig.output.filename ) const bundle = mfs.readFileSync(bundlePath,"utf-8"); const m = new Module(); m._compile(bundle,"server-entry.js"); serverBundle = m.exports.default })