Use readline to avoid error in some node versions.

This commit is contained in:
Dillon Kearns 2019-08-22 06:47:01 -07:00
parent 2fbbc7079f
commit 59435c7b35

View File

@ -13,6 +13,7 @@ const ImageminPlugin = require("imagemin-webpack-plugin").default;
const imageminMozjpeg = require("imagemin-mozjpeg");
const express = require("express");
const ClosurePlugin = require("closure-webpack-plugin");
const readline = require("readline");
module.exports = { start, run };
function start({ routes, debug, manifestConfig }) {
@ -99,8 +100,8 @@ function roundToOneDecimal(n) {
}
function printProgress(progress, message) {
process.stdout.clearLine();
process.stdout.cursorTo(0);
readline.clearLine(process.stdout);
readline.cursorTo(process.stdout, 0);
process.stdout.write(`${progress} ${message}`);
}
function webpackOptions(production, routes, { debug, manifestConfig }) {