diff --git a/packages/@vue/cli-service/lib/commands/build/index.js b/packages/@vue/cli-service/lib/commands/build/index.js index 5589ffb31a..15f6b4d16f 100644 --- a/packages/@vue/cli-service/lib/commands/build/index.js +++ b/packages/@vue/cli-service/lib/commands/build/index.js @@ -37,7 +37,8 @@ module.exports = (api, options) => { '--report': `generate report.html to help analyze bundle content`, '--report-json': 'generate report.json to help analyze bundle content', '--skip-plugins': `comma-separated list of plugin names to skip for this run`, - '--watch': `watch for changes` + '--watch': `watch for changes`, + '--stdin': `close when stdin ends` } }, async (args, rawArgs) => { for (const key in defaults) { @@ -155,6 +156,13 @@ async function build (args, api, options) { }) } + if (args.stdin) { + process.stdin.on('end', () => { + process.exit(0) + }) + process.stdin.resume() + } + // Expose advanced stats if (args.dashboard) { const DashboardPlugin = require('../../webpack/DashboardPlugin')