diff --git a/_scripts/ProcessLocalesPlugin.js b/_scripts/ProcessLocalesPlugin.js index d08bb3734f833..3db0b55f21d3b 100644 --- a/_scripts/ProcessLocalesPlugin.js +++ b/_scripts/ProcessLocalesPlugin.js @@ -71,8 +71,7 @@ class ProcessLocalesPlugin { } for (let [locale, data] of this.locales) { - // eslint-disable-next-line no-async-promise-executor - promises.push(new Promise(async (resolve) => { + promises.push(async () => { if (IS_DEV_SERVER && compiler.fileTimestamps) { const filePath = join(this.inputDir, `${locale}.yaml`) @@ -86,7 +85,6 @@ class ProcessLocalesPlugin { } else { const { filename, source } = this.cache.get(locale) compilation.emitAsset(filename, source, { minimized: true }) - resolve() return } } @@ -117,9 +115,7 @@ class ProcessLocalesPlugin { } compilation.emitAsset(filename, source, { minimized: true }) - - resolve() - })) + }) } await Promise.all(promises)