В Rollup это делалось так:
export default {
input: 'src/main.js',
...
!production && serve(),
...
}
function serve() {
let started = false;
return {
writeBundle() {
if (!started) {
started = true;
require('child_process').spawn('npm', ['run', 'start'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});
}
}
};
}