diff --git a/package.json b/package.json index 81b9e94a9101fb..85b71f65dc1504 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,6 @@ "minimist": "^1.2.5", "open": "^7.2.1", "ora": "^5.1.0", - "p-map-series": "^2.1.0", "postcss-discard-comments": "^4.0.2", "postcss-import": "^12.0.1", "postcss-load-config": "^3.0.0", diff --git a/src/node/build/index.ts b/src/node/build/index.ts index 6d4d29c97a89a9..eb4f14c355e93f 100644 --- a/src/node/build/index.ts +++ b/src/node/build/index.ts @@ -1,7 +1,6 @@ import path from 'path' import fs from 'fs-extra' import chalk from 'chalk' -import pMapSeries from 'p-map-series' import { Ora } from 'ora' import { klona } from 'klona/json' import { resolveFrom, lookupFile, toArray, isStaticAsset } from '../utils' @@ -572,7 +571,9 @@ async function doBuild(options: Partial): Promise { // multiple builds are processed sequentially, in case a build // depends on the output of a preceding build. - const results = await pMapSeries(builds, async (build, i) => { + const results = [] + for (let i = 0; i < builds.length; i++) { + const build = builds[i] const { output: outputOptions, onResult, ...inputOptions } = build const indexHtmlPath = getIndexHtmlOutputPath(build, outDir) @@ -666,8 +667,8 @@ async function doBuild(options: Partial): Promise { } spinner && spinner.start() - return result - }) + results.push(result) + } // copy over /public if it exists if (write && emitAssets && fs.existsSync(publicDir)) {