Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import fork from 'umi-build-dev/lib/fork';
const child = fork(require.resolve('./realDev.js'));
child.on('message', data => {
if (process.send) {
process.send(data);
}
});
child.on('exit', code => {
if (code === 1) {
process.exit(1);
}
});
process.on('SIGINT', () => {
child.kill('SIGINT');
});